use strict; open INPUT, "<version.txt" or die "Blerch: $!\n"; while (<INPUT>) { # read a line of input my @contents=split /\s+/; # Split on whitespace print join ":", (pack("A10",$contents[0]), # Name, padded to 10 width pack("A5",$contents[1]), # version, padded to 5 width "\n"); } __END__ Nameone :100 : Nametwo :110 : Namethree :120 :
CU
Robartes-
In reply to Re: Lost arrays
by robartes
in thread Lost arrays
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |