in reply to Using Push and Pop.
That line modifies @file (with pop) while looping through it with foreach.foreach (@file) { my $test = pop (@file); print $test; }
You should drop one of the statements for something better. I.e. change the foreach to while.
ps: print reverse <>; :-)
|
|---|