Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re^2: Sorting files you Have read

by GrandFather (Saint)
on Nov 16, 2006 at 23:16 UTC ( #584631=note: print w/replies, xml ) Need Help??

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

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://584631]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2022-08-07 21:23 GMT
Find Nodes?
    Voting Booth?

    No recent polls found