I usually parse such text files (text files with column headers) like this:
use warnings; @input = ( 'U Np Pu', '238 237 244', ); @name = $input[0] =~ /\S+/g; @number{@name} = $input[1] =~ /\S+/g; print "The weight of Pu is ", $number{"Pu"}, "\n"; __END__
In reply to Re: regex help!
by ambrus
in thread regex help!
by igotlongestname
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |