- or download this
<exm>This is example 1
<exm>This is example 2
<exm>This is example 3
<exm>This is example 4
- or download this
<exm num="1">This is example 1
<exm num="2">This is example 2
<exm num="3">This is example 3
<exm num="4">This is example 4
- or download this
$_ =~ s/<exm>/'<exm num="'.$exmno++.'">'/egs;
if ($_ != /<exm>/g) {$exmno=0}