in reply to Making multiple replaces through Regex
Try like this,
my ($colno) = $_ =~ /<csp c="(\d+)">/;
for my $i (1..$colno)
$csp = $csp."<colspec colnum=\"$i\" colname=\"col$i\"\/>\n";
Once (shame on you!)
Twice (shame on me!)
More often than I'd like to be
All the time
Just when answering stupid polls
Who you callin' a fool?
I refuse to vote in this ridiculous poll
Results (433 votes). Check out past polls.