Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

RegEx bump version number

by ady (Deacon)
on Apr 25, 2007 at 17:28 UTC ( [id://612060]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
    # but this won't compile, --- why?
    #$version =~ s/(\d+\.\d+\.)(\d+)(\.\d+)/{$1}$2+1{$3}/e;
    print $version;
    
  2. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
    
    $version =~ s/(\d+)(?=\.\d+\z)/$1 + 1/e;
    print "$version\n";
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-25 16:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found