in reply to Re: Open file without changing modified date/time
in thread Open file without changing modified date/time

Ted,

I followed your approach but wrote my own code to do it. But just in case someone tries to use your code, I think it has a bug. I think the line $_ = <F>; since you will just read one line.

Replies are listed 'Best First'.
Re^3: Open file without changing modified date/time
by graff (Chancellor) on Dec 08, 2004 at 03:32 UTC
    You forgot to notice this line in Ted's code:
    $/ = undef;
    Look up $/ in perldoc perlvar -- in case you don't know what "slurp mode" is for file reads, that section of the docs will explain it. It's not a bug.
      Oh, very nifty. No, I did not know about slurp mode and that's why I said I *think* there is a bug. I learn new things everyday, thanks guys!