I just wondered if this could be turned into a one-liner?
open FH,"< $ARGV[0]" or die $!; while (<FH>) { my ($pre, $last) = $_ =~ m/(.*),(\w+)/; $last = substr(("0" x 5) . $last, -1 * 5, 5); print "$pre,$last\n"; } close FH;
In reply to one liner? by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |