Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: Why do i get an extra (duplicate) array element?-

by TomDLux (Vicar)
on Jun 23, 2016 at 19:18 UTC ( [id://1166408]=note: print w/replies, xml ) Need Help??


in reply to Re: Why do i get an extra (duplicate) array element?-
in thread Why do i get an extra (duplicate) array element?-

Why not just use the numeric value in the string:

$ perl -demo DB<1> $A = "123" DB<2> if ( $A < 0 ) { print 'negative' }else {print 'non-negative'} non-negative DB<3> $A = "-123" DB<4> if ( $A < 0 ) { print 'negative' }else {print 'non-negative'} negative

As Occam said: Entia non sunt multiplicanda praeter necessitatem.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1166408]
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 2025-07-20 01:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.