#!/usr/bin/perl use strict; use warnings; my $fragment = ' <foo>3</foo> <foo>14</foo> <foo>159</foo> [...] '; print $fragment; my $n = 1; $fragment =~ s/\d+/ $n++ /ge; print $fragment;
In reply to Re: sequential substitutions
by tybalt89
in thread sequential substitutions
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |