in reply to Re: Unexpected file test (-f) result on Windows
in thread Unexpected file test (-f) result on Windows

Very true: thank you. My normal idiom is:

open FILE, "name" or die "died: $!";

For some inexplicable reason, I used || in this test script!

("Yeah, right, that's what they all say!" shouts somebody at the back of the room...)

Is the last form of open in your examples just a Perl 5.8 construct? I've not seen it used that much (then again, I don't regularly review much code, apart from on PerlMonks).

Cheers,

-- Dave :-)


$q=[split+qr,,,q,~swmi,.$,],+s.$.Em~w^,,.,s,.,$&&$$q[pos],eg,print

Replies are listed 'Best First'.
Re: Re: Re: Unexpected file test (-f) result on Windows
by dws (Chancellor) on Sep 19, 2003 at 17:22 UTC
    Is the last form of open in your examples just a Perl 5.8 construct?

    The three argument open is in 5.6. I think it was in 5.0. Perhaps someone who has one at hand can verify.

      I've just checked on the machines I have available, and it seems like a 5.6.0 onwards feature. The 5.005_03 install (which was the lowest I could find) does not mention MODE in the perldoc.

      Thanks for the feedback. I'll start using that construct from now on.

      Cheers,

      -- Dave :-)


      $q=[split+qr,,,q,~swmi,.$,],+s.$.Em~w^,,.,s,.,$&&$$q[pos],eg,print