Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Strange File Not Found Error

by mr.nick (Chaplain)
on Jun 15, 2001 at 01:18 UTC ( [id://88630]=note: print w/replies, xml ) Need Help??


in reply to Strange File Not Found Error

I'd just like to add that the fragment
open LABS, "/software/polaris-mfcf/data/local/w.stat" or die "Unable to open file: $!\n";
doesn't do what you expect it to, IIRC. In reality, it's saying something like:
open LABS, ("/software/polaris-mfcf/data/local/w.stat" or die "Unable to open file: $!\n")
The or operator bonds to the string "/software/...", not to the open command. You'll want to do this instead
open (LABS, "/software/polaris-mfcf/data/local/w.stat") or die "Unable to open file: $!\n";

Update: Well! I'll be hogtied: "or" != "||". I had always assume that "or" and "and" were just common language equals to their || && counterparts. I didn't know their behaviors where different.

mr.nick ...

Replies are listed 'Best First'.
Re: Re: Strange File Not Found Error
by nardo (Friar) on Jun 15, 2001 at 01:34 UTC
    The or operator bonds to the string "/software/...", not to the open command

    That's the || operator, not the or operator:
    open FILE, "doesnotexist" or print "or\n"; open FILE, "doesnotexist" || print "|| #1\n"; open(FILE, "doesnotexist") || print "|| #2\n";

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://88630]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2024-03-29 14:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found