in reply to Where oh where should I initialize my vars?
A quick scan through the split documentation says that when called in the scalar context, it will return the count of the substrings. You may want to put a test in first - something like:
Updated I should not try to program before my first cup of coffee. Yes, fastolfe and runrig picked up the error - the single "=" has been replaced with the "==". (slaps himself silly)if ( (scalar (split /\t/)) == 3 ) { # Do our stuff } else { print "Bad data", $_; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: Where oh where should I initialize my vars?
by merlyn (Sage) on Oct 26, 2000 at 01:41 UTC | |
by Maclir (Curate) on Oct 26, 2000 at 01:47 UTC | |
|
RE: Re: Where oh where should I initialize my vars?
by runrig (Abbot) on Oct 26, 2000 at 01:45 UTC |