Here's a distillation of something that just bit me, behaves the same on
5.6.1 and 5.8.5.  Observe the following program:

for (1..2) {
  print_file($0);
}

for (qw(one two)) {
  print_file($0);
}

sub print_file {
  local @ARGV = shift;
  while (<>) { print }
}

__END__

Before running it, can you tell:
  Will it succeed or not?
  If not, with what error?
  Where?
  Why?

-- 
Peter Scott
http://www.perlmedic.com/
http://www.perldebugged.com/

Reply via email to