Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Returned value from subroutine is 1 when returning ""

by mjscott2702 (Pilgrim)
on Jan 06, 2011 at 16:21 UTC ( [id://880855]=note: print w/replies, xml ) Need Help??


in reply to Returned value from subroutine is 1 when returning ""

You should use "or" instead of "||" here, since it has lower precedence - in fact, I believe(?) this is the recommended practice.
  • Comment on Re: Returned value from subroutine is 1 when returning ""

Replies are listed 'Best First'.
Re^2: Returned value from subroutine is 1 when returning ""
by DrHyde (Prior) on Jan 07, 2011 at 10:29 UTC
    I recommend not using 'or', 'and' etc, but instead using brackets to make precedence explicit.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2024-04-25 11:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found