On Thursday, May 30, 2002, at 02:53 PM, bob ackerman wrote:
> > 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). > except the range dude skips the NPROC line and the simple match doesn't. so you would have to like set a flag and check that as well, so it wouldn' t be fewer strokes, and in fact, not as elegant as the range thing, so.... never mind. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]