in reply to create hashes using regex
A quick try under the Perl debugger:
DB<1> $c = "TCONS_00000047 XLOC_000039"; DB<2> %h = map { $1, $2 if /(TCONS_00[0-9]+) (XLOC_[0-9]+)/; } ($c); DB<3> x %h 0 'TCONS_00000047' 1 'XLOC_000039'
EDIT: HDB typed faster than me. ;-)
|
---|
In Section
Seekers of Perl Wisdom