in reply to Loop through a constant array
++ for kenneth, but I prefer to name the iteration item. This way, if your routine grows larger, it's easy to identify what is what, instead of relying on $_:
#!/usr/bin/perl use warnings; use strict; use constant VALUES => qw( 1 2 3 4 5 ); for my $value ( VALUES ) { print "$value\n"; }
Steve
|
|---|