- or download this
for(my $i = 0; $i < @ARGVl $i++) {
if($ARGV[$i] =~ /meets some condition/) {
...
$i += 2;
}
}
- or download this
for my $i (0 .. $#ARGV) {
if($ARGV[$i] =~ /meets some condition/) {
...
$i += 2;
}
}
- or download this
use Benchmark qw(cmpthese);
my @list = 1..10000;
...
Rate cstyle perlstyle
cstyle 36.1/s -- -58%
perlstyle 86.8/s 141% --