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

Re^2: why dosn't my code work?

by tweetiepooh (Hermit)
on Apr 21, 2009 at 09:45 UTC ( [id://758920]=note: print w/replies, xml ) Need Help??


in reply to Re: why dosn't my code work?
in thread why dosn't my code work?

Additionally comparing to a fixed text need that value in quotes
if ($value eq "string")

Replies are listed 'Best First'.
Re^3: why dosn't my code work?
by moritz (Cardinal) on Apr 21, 2009 at 11:04 UTC
    While it is correct that one should quote strings, it's by no means required (unless one uses strict, which again is highly recommended).
    $ perl -E 'if (foo eq "foo") { say STDOUT yes } ' yes

    I really don't recommend it, but it does work without quotes.

Log In?
Username:
Password:

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

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

    No recent polls found