in reply to extra space with /

How about changing your one regex just a tad:
my ( $name, $value ) = ( $line =~ /^\s*(.*?):(.*)$/ );
to:
my ( $name, $value ) = ( $line =~ /^\s*(.*?):\s*(.*)$/ );
This might squeeze any leading spaces from $value. Noting seeing the data file I'm not sure this is necessary. But from the other comments it looks like "poke" around time.

Claude

Replies are listed 'Best First'.
Re: Re: extra space with /
by malaga (Pilgrim) on Apr 03, 2001 at 12:02 UTC
    oh my god. thank you. it worked. i didn't use it where i had the regex, but up where i was splitting the $prodtxt. :)