http://www.perlmonks.org?node_id=176928


in reply to Re^2: fastest pattern match
in thread fastest pattern match

Good advice in general,
but in this case there'll only be one interation.

Update: Fastolfe's right...my bad...mea culpa

~monk d4vis
#!/usr/bin/fnord

Replies are listed 'Best First'.
Re: Re: Re^2: fastest pattern match
by Fastolfe (Vicar) on Jun 24, 2002 at 20:25 UTC
    Why? If we were sure the match would always occur on the first line, why search for it at all?