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
|
|---|