http://www.perlmonks.org?node_id=1006986


in reply to Re^2: Problem while Data Extraction
in thread Problem while Data Extraction

my @F = split(/\|/, $_, 0); foreach $_ (@F) { if (/^[\da-z]{2}(?:\s[\da-z]{2})*$/i) { s/\s+//g; print $_; } else { print unpack('H*', $_), $/; } }