Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: = rather than =~ ?

by jweed (Chaplain)
on Jan 01, 2004 at 17:18 UTC ( #318133=note: print w/ replies, xml ) Need Help??


in reply to = rather than =~ ?

This is technically valid perl. Since no search string is specified, $_ will be searched, implicitly. Then, as perlop points out, the match in scalar context returns true when a match occurs and false when it doesn't. So $input will be true or false, based on whether $_ had one or more word characters.



Who is Kayser Söze?
Code is (almost) always untested.


Comment on Re: = rather than =~ ?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (17)
As of 2015-07-02 17:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (44 votes), past polls