in reply to Re: Testing filehandles
in thread Testing filehandles

exit is not a good idea, last is a much better idea. exit will stop the execution of the script, last will stop the loop, see the difference in: perl -wle 'print q(X);while(1) { exit; } print q(Y);' and perl -wle 'print q(X);while(1) { last; } print q(Y);'