- or download this
#!/usr/bin/perl -p
s/(\d+\.\d+\.\d+\.)(\d+)/$1${\($2-1)}/;
- or download this
$ ./decrement.pl infile >outfile
- 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;