in reply to extracting variables from regex
If I understand your question correctly, wouldn't it make sense to do the following?
$ echo 123.45.67.890 | perl -ne 'for $x(1..3){/(\d+)/g; printf "%X", $ +1}' 7B2D43
The $x is there just to prevent $_ from being overwritten.
Cheers,
Ovid
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
|
|---|