Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

difference in regex

by ovedpo15 (Pilgrim)
on May 29, 2018 at 12:56 UTC ( [id://1215361]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my ($value) = ($row =~  /.*,(.*)/); # gets value after the last comma
    if (looks_like_number($value))
    ...
        # DO STUFF ...
    }
    # DO STUFF ...
    
  2. or download this
    my ($value) = ($row =~  /.*,(.*)/);
    my ($val) = ($row =~ s/,[^,]*$//);
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1215361]
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2024-04-24 15:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found