in reply to Re: Fetch data between markers
in thread Fetch data between markers
From the Perl Cookbook:
The range operators, .. and ..., are probably the least understood of Perl's myriad operators. They were designed to allow easy extraction of ranges of lines without forcing the programmer to retain explicit state information. Used in scalar context, such as in the test of if and while statements, these operators return a true or false value that's partially dependent on what they last returned. The expression left_operand .. right_operand returns false until left_operand is true, but once that test has been met, it stops evaluating left_operand and keeps returning true until right_operand becomes true, after which it restarts the cycle. Put another way, the first operand turns on the construct as soon as it returns a true value, whereas the second one turns it off as soon as it returns true.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Fetch data between markers
by penantes (Acolyte) on Jun 07, 2005 at 14:42 UTC |