On Thursday, May 30, 2002, at 11:20  AM, David Gray wrote:

>>>> while (<INPUTDATA>) {
>>>>     chomp;
>>>>     s/^\s+//;
>>>>     next if (m/^$/ || (1 .. /^NPROC/));
>>>
>>> what does the range thing do?
>>> wouldn't just ... || /^NPROC/   be enough?
>>
>> ok. opposite sense:   || ! /^NPROC/
>
> So that would be:
>
>  next if (m/^$/ || ! /^NPROC/);
>
> Which means skip processing the line if it's an empty line or if the
> line doesn't begin with NPROC...
>
> What (1 .. /^NPROC/) does is it returns true until it matches /^NPROC/
> and then returns false every time it's called after that.
>

well, yeah - but to belabor a dead hearse - why bother with the range 
thing when it does the same thing as the simple match with fewer strokes 
and less work for poor ol' perl (POP).


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to