![]() |
|
go ahead... be a heretic | |
PerlMonks |
Re^5: Parse data from a line to get 2 variablesby Anonymous Monk |
on May 13, 2006 at 01:41 UTC ( #549156=note: print w/replies, xml ) | Need Help?? |
\S+ matches one or more non-whitespace characters \s+ matches one or more whitespace chars So my ($lot,$prod) = m/(\S+)\s+(\S+)/; is matching the lotnumber and putting it into $lot, matching the tab and throwing it away, then matching the product code and putting it into $prod
In Section
Seekers of Perl Wisdom
|
|