in reply to Grep Speeds

I'm wondering why you are testing $ECL (which should be a string unless you're not showing the grep options you are using) for numerical equality with ""? Wouldn't that always be true or am I missing something here?

Update: Ok, I understand what you want, but you'd better put an eq in there instead of == as ANY string will match "" numerically (i.e. "a456" == "" is true). The only case where that won't be true is where $ECL contains a number or a string starting with a number which is then interpreted as a plain number in the numeric context, but all you are really trying to do is see if $ECL is empty, so use eq. If your data file is ever changed so the lines start with a non-number, your code will no longer work.

Actually if you ran your code with -w you'd get: Argument "" isn't numeric in numeric eq (==) at line xxx.

--
I'd like to be able to assign to an luser

Replies are listed 'Best First'.
Re: Re: Grep Speeds
by ImpalaSS (Monk) on Feb 06, 2001 at 21:01 UTC
    Hey,
    Basically with that line, its saying if a specific instance isnt found (for example is a half hour for a certain date, ie: 20042pa|02/06/2001|8:30 was missing) it would insert $item as a place carrier.

    Dipul