Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: regex to match numbers after decimal

by Kenosis (Priest)
on Jan 15, 2014 at 05:40 UTC ( [id://1070647]=note: print w/replies, xml ) Need Help??


in reply to regex to match numbers after decimal

Adding to NetWallah's suggestion, perl (the interpreter) 'sees' the numeric value of $price as -1.5, not the -1.500 you've scripted:

perl -MO=Deparse,-p -e 'my $price = -1.500;' (my $price = (-1.5)); -e syntax OK

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2024-04-26 03:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found