If you are going to use strict; use warnings; (and it is a really really good idea), then you really really need to declare your variables: ;)
use strict; # a good idea use warnings; # and another my $input = 'myinput.txt'; open(my $in, "<", $input) or die "Could not open $input because $!\n"; my @unsorted = <$in>; chomp (@unsorted); # get rid of end-of-record markers close ($in); my @sorted = sort @unsorted;
In reply to Re^2: Sorting files you Have read
by GrandFather
in thread Sorting files you Have read
by brusimm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |