in reply to •Re: Re: •Re: Re: •Re: Seeking an idiom for localizing $/
in thread Seeking an idiom for localizing $/

Yes, I'd assumed that it was the scalar context that made it magic. Stupidly I'd thought about changing the if to a while before I posted, but decided it didn't matter ... ahh well, I may be slow but I've got there in the end. So...

sub next_record() { local $/ = "DELIM"; while (<FILE>) { return 1; } return 0; } while (next_record()) { ... }

...is what I should have posted about 10 posts up the thread.

--
James Antill
  • Comment on Re: •Re: Re: •Re: Re: •Re: Seeking an idiom for localizing $/
  • Download Code