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


in reply to Re^2: Parse data from a line to get 2 variables
in thread Parse data from a line to get 2 variables

He actually gave you the answer, more or less:

my ($lot,$prod) = m/(\S+)\s+(\S+)/;
instead of:
$Info=$_; $lotNumber=substr($Info, 0,8); $productName=substr($Info, 9);
I'm not sure what you are doing with the if(m%E%), but I presume that is for testing...

Devnul