Well my code may "look horrible" to you, but at least it works. Your code, on the other hand, simply tosses away the record being read. No assignments to $_ there, as you would need.sub next_record() { local $/ = "DELIM"; if (<FILE>) return 1; return 0; } while (next_record()) { ... }
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In reply to •Re: Re: •Re: Seeking an idiom for localizing $/
by merlyn
in thread Seeking an idiom for localizing $/
by perlcgi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |