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";
Electric eels were invented at the same time as electricity
Before electricity was invented, electric eels had to stun with gas
Results (394 votes). Check out past polls.