Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: Converting to boolean

by QM (Parson)
on Jun 18, 2004 at 01:42 UTC ( [id://367831]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Converting to boolean
in thread Converting to boolean

.. which would otherwise do the wrong thing for a filename such as "0".
Umm, perhaps I'm being too picky, but I think that was a flawed example.
defined($filename) && length($filename)
would evaluate correctly, regardless of the actual filename.

Now, if you tried just $filename as the return value, that would be problematic...

-QM
--
Quantum Mechanics: The dreams stuff is made of

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-03-29 09:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found