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 reply to Re: create hashes using regex
by Laurent_R
in thread create hashes using regex
by bingalee
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |