Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Using hash value as condition.

by graff (Chancellor)
on Mar 30, 2014 at 00:57 UTC ( #1080248=note: print w/replies, xml ) Need Help??

in reply to Using hash value as condition.

The point here is that "false" is not a reserved word (or a built-in function) in Perl, so it has no special meaning. In your snippet, it's treated as a "bareword", which you can look up under "B" in the perlglossary:

A word sufficiently ambiguous to be deemed illegal under use strict 'subs'. In the absence of that stricture, a bareword is treated as if quotes were around it.

In other words:

perl -le '$x = false; print length($x); print "x is ".join("-",split// +,$x)'
(that will print out two lines: "5" and "x is f-a-l-s-e")

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1080248]
NodeReaper edits tomorrow's obituaries

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2018-03-17 17:03 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (225 votes). Check out past polls.