in reply to Re: Sample Sort Code
in thread Sample Sort Code

Hello everyone, Thanks for the reply. I think this option looks best for me, can you please tell me how to pass an input file instead of EOD, thanks

Replies are listed 'Best First'.
Re^3: Sample Sort Code
by mreece (Friar) on Sep 13, 2006 at 18:25 UTC
    open my $input, '<', 'myfile.txt' or die "cannot open myfile.txt: $!"; my @lines = <$input>;
    or, from command line args:
    my $filename = $ARGV[0] or die "Usage: $0 <filename>\n"; open my $input, '<', $filename or die "cannot open $filename: $!"; my @lines = <$input>;