in reply to Re: Sorting files you Have read
in thread Sorting files you Have read

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;

DWIM is Perl's answer to Gödel

Replies are listed 'Best First'.
Re^3: Sorting files you Have read
by brusimm (Pilgrim) on Nov 16, 2006 at 23:34 UTC
    Thank you, everyone
    This points me in the right direction
    I used to do IDL and Fortran (About 7 years ago..)
    but this seems harder. Sheesh.. is it me being out of the programming loop so long, or is see-nellity setting in?
    Maybe you shouldn't answer that!!
    Take care.

      You're OK. Perl is just different from what most people are used to. e.g. my CS modules at university (about 3 years ago) mostly used Java, and I have mostly hobby experience of C/C++, but I'd probably feel like you do now if I suddenly tried to do enterprise Java, use C++ templates, use C# or even use Perl in any meaningful way (my main work language is Delphi, although I do support some Perl projects I didn't develop).

      How can you feel when you're made of steel? I am made of steel. I am the Robot Tourist.
      Robot Tourist, by Ten Benson