On 2/10/11 Thu Feb 10, 2011 1:07 PM, "David Jacopille" <p...@shortloop.com> scribbled:
> Is there a way to match and substitute at the same time? > > I have an html table where each row contains 11 columns of numbers. > > Unfortunately all the numbers have commas separating the thousands, millions, > etc. > > To find the number I need to match against [\d,]. > > What I really want is the capture array or $1, $2, $3, etc. to be free of > commas, all done in the matching step. > > Any ideas? Yes. Capture the numbers with the commas included ([\d,]+), then delete the commas with tr/,//d; -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/