in reply to reading a file, put into array. Missing first line

You should always post the code you are running. What you posted doesn't compile.

With the previous suggestion, here is a simplified version of your code:

use warnings; use strict; my $file = 'filename.txt'; open my $fh, '<', $file or die "cant open : $!"; my @comp = sort <$fh>; close $fh; print "@comp";

Replies are listed 'Best First'.
Re^2: reading a file, put into array. Missing first line
by kaka_2 (Sexton) on Oct 11, 2013 at 18:38 UTC

    Thank you correcting me. and sorry about not able to post the actual code. copy paste is not allowed from citrix terminal and in that case i have to type it here manually. is there a option of attaching image ?