- or download this
use strict;
use warnings;
...
for my $t (0 .. $#config){ # Your style (c-style for loop)
print "$t:$config[$t];\n";
}
- or download this
@config = map {s/oldtext/newtext/g; $_; } @config;
- or download this
map {s/oldtext/newtext/g; } @config;
- or download this
s/oldtext/newtext/ for @config;