in reply to extracting variables from regex

As they say, "Look, Ma! No regex!"
echo 12.34.56.78 | perl -MSocket -ne "printf('%08X',unpack('N',inet_aton(\$_)))"
Sometimes people get caught up in a situation not unlike "when all you have is a regex, everything looks like a pattern". Especially with e-mail addresses and URLs.

As a note, the Socket inet_aton function will also resolve host addresses (i.e. "www.yahoo.com") and will reject malformed IP addresses (i.e. "123.456.789.012").