http://www.perlmonks.org?node_id=1009604


in reply to File open issue

What is the warning that you get? And when you use  or die $!;, what is the output?


Dave

Replies are listed 'Best First'.
Re^2: File open issue
by Anonymous Monk on Dec 19, 2012 at 19:12 UTC
    What about this:
    if(-r $tempfile) { open (TMPFILE, "$tempfile") or die "Can't open $tempfile: $!"; (@tmpfile) = <TMPFILE>; close TMPFILE; }else { $nofile = "1"; }