Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Newbie flabbergasted by string compare results

by Happy-the-monk (Monsignor)
on Jul 05, 2013 at 13:31 UTC ( #1042711=note: print w/ replies, xml ) Need Help??


in reply to Newbie flabbergasted by string compare results

What did I do wrong here?

Hmm, to start with, having a sub main in your script is a bit unusual, since the main routine is the one not in any subroutine with Perl.

The dot (.) joining your comparison and the "\n" at the end of the lines to be printed does not stringify the result the way you expected it to. Use a comma (,) as a list operator instead and things will turn out to be just as you imagined.

Cheers, Sören

(hooked on the Perl Programming language)


Comment on Re: Newbie flabbergasted by string compare results
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2014-07-26 15:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (178 votes), past polls