Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: incrementing a number

by chromatic (Archbishop)
on Oct 12, 2010 at 16:23 UTC ( [id://864894]=note: print w/replies, xml ) Need Help??


in reply to incrementing a number

If your columns always match the regular expression [A-Z]+\d+, you can match and increment only the numeric portion:

$fields[12] =~ s/(\d+)/ $1 + 1 /e;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-03-28 19:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found