in reply to Ranking files, largest to smallest
Hi ewexperts,
Change
into chomp (@lines = <FILE>);my @lines = <FILE>; chop(@lines); foreach my $str (@lines) { chomp(@lines); }
Here chop is not necessary to remove the newline character, it ll remove the last character, not only newline character. Instead you can use chomp which removes only the newline character at the end.
Prasad
|
---|
In Section
Seekers of Perl Wisdom