while(<STATUS>) sets $_ (see perlop ¹) and $_ is global.
Maybe you rather wanna use:
while (my $line = <STATUS>)
Cheers Rolf
¹)
The following lines are equivalent:
while (defined($_ = <STDIN>)) { print; } while ($_ = <STDIN>) { print; } while (<STDIN>) { print; } for (;<STDIN>;) { print; } print while defined($_ = <STDIN>); print while ($_ = <STDIN>); print while <STDIN>;
In reply to Re: Very curious Problem...
by LanX
in thread Very curious Problem...
by anaconda_wly
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |