in reply to Seeking an idiom for localizing $/

while (defined ($_ = do { local $/ = "DELIM"; <FILE> })) { ... }

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

Replies are listed 'Best First'.
Re: •Re: Seeking an idiom for localizing $/
by perlcgi (Hermit) on Apr 29, 2004 at 15:47 UTC
    Thanks once again Randal.
    A grateful perlcgi makes mental note to purchase his own copy of Learning Perl Objects, References & Modules and wonders if this idiom is well know, or just an off-the-cuff creation of the wizard.
      wonders if this idiom is well know, or just an off-the-cuff creation of the wizard
      Just synthesized from smaller idioms. It's not that I'm necessarily a wizard: I just remember lots of little things that work, and put them together in interesting ways.

      -- Randal L. Schwartz, Perl hacker
      Be sure to read my standard disclaimer if this is a reply.

        Isn't that the definition of wizard?

        -- @/=map{[/./g]}qw/.h_nJ Xapou cets krht ele_ r_ra/; map{y/X_/\n /;print}map{pop@$_}@/for@/
A reply falls below the community's threshold of quality. You may see it by logging in.