programming-examples/perl/Statement/Looping through an array with the for repetition structure.pl

5 lines
113 B
Perl
Raw Permalink Normal View History

2019-11-15 12:59:38 +01:00
@array = ( "Hello", 283, "there", 16.439 );
for ( $i = 0; $i < 4; ++$i ) {
print "$i $array[ $i ]\n";
}