Just another tip: there is no need to read all of STDIN into an array; you can iterate over each line as it comes in.foreach my $line (<STDIN>) { ... }
The problem with that is that the foreach loop will read all lines into a list in memory first.
You need a while loop to iterate over one line at a time:
while ( my $line = <STDIN> ) { ... }
In reply to Re^2: Beginner in perl : Use of uninitialized value
by jwkrahn
in thread Beginner in perl : Use of uninitialized value
by Perl_Programmer1992
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |