Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!sun-barr!newstop!male!anywhere.EBay.Sun.COM!me From: me@anywhere.EBay.Sun.COM (Wayne Thompson - IR Workstation Support SE) Newsgroups: comp.lang.perl Subject: eval and || Message-ID: <3991@male.EBay.Sun.COM> Date: 24 Nov 90 17:53:33 GMT Sender: news@male.EBay.Sun.COM Lines: 22 The following code opens /etc/passwd but fails to die on /etc/bogus. Any ideas? (3.0pl41) &PushFiles ('$passwd', '/etc/passwd' , '$bogus', '/etc/bogus' ); for $file (@files) { ($fh = $file) =~ s/^\$//; eval (' open (' . $fh . ') || die "$MYNAME: error: ' . $file . ': $!\n"; '); } sub PushFiles { local (@list) = @_; local ($fh, $file); while (($fh, $file, @list) = @list) { eval "$fh = '$file'"; push (@files, $fh); } }