in reply to uninitialized value on hash lookup (was: hash problem)
If you're splitting a record on tabs, you might want to check if multiple tabs separate the fields. If so, you could use:my ($Line, $Filed, $Dvalue) = split(/\t/);
I'm a beginner PERL user but I hope that helps.my ($Line, $Filed, $Dvalue) = split(/\t+/);
Update: Changed /\t*/ to /\t+/ to avoid unexpected results. Thanks esper!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: hash problem
by dsheroh (Monsignor) on May 21, 2002 at 16:10 UTC | |
|
Re: Re: hash problem
by Anonymous Monk on May 21, 2002 at 17:09 UTC |