programming-examples/perl/Statement/Demonstrating the .. operator.pl
2019-11-15 12:59:38 +01:00

10 lines
212 B
Raku

@array2 = ( 1 .. 5 );
print "Value\tRunning Total\n";
for ( $i = 0; $i < 5; ++$i ) {
$total += $array2[ $i ];
print( $array2[ $i ], "\t$total\n");
}
@array2 = ( 'a' .. 'z' );
print "\n@array2\n";