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

Re: Unexpected Output

by Your Mother (Archbishop)
on Jul 28, 2010 at 16:21 UTC ( [id://851745]=note: print w/replies, xml ) Need Help??


in reply to Unexpected Output

Please use the $string = @arr ? 'False' : 'True'; idiom cdarke offered. $#arr is (so I say) a poor style choice to use anywhere (in general) and both confusing and potentially error prone here (as nvivek notes).

Replies are listed 'Best First'.
Re^2: Unexpected Output
by k_manimuthu (Monk) on Jul 29, 2010 at 07:26 UTC

    Dear All - Thanks a lot for your suggestion and solutions.
    Thanks to introduce some new things to me. Specially for ...

    $string = ($#arr == -1 ) ? 'True' : 'False';

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2024-04-25 19:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found