Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -p
    
    s/(\d+\.\d+\.\d+\.)(\d+)/$1${\($2-1)}/;
    
  2. or download this
    $ ./decrement.pl infile >outfile
    
  3. or download this
    s/(\d+\.\d+\.\d+\.)(\d+)/$1.($2-1)/e;
    
    # or (just to show another variant)
    s/(\d+\.\d+\.\d+\.)(\d+)/"$1".($2-1)/e;