in reply to Matching ranges

Sometime $/ is just easier:

#! perl -slw use strict; $/ = 'Services'; scalar <>; ## discard everything up to the start of the bit you want $/ = 'Users'; print scalar <>; print the bit you want __END__ c:\test>junk31 junk31.dat ======================================================== blah glah sfsd asfsdf afsafdf ======================================================== Users

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP an inspiration; A true Folk's Guy

Replies are listed 'Best First'.
Re^2: Matching ranges
by ldbpm (Initiate) on Sep 02, 2010 at 02:54 UTC
    Much thanks ...