On Fri, Feb 06, 2004 at 09:45:43AM -0500, [EMAIL PROTECTED] wrote:
> 
> What does the construct "}{" mean?  As in
> 
> 
>   $ perl -pe ' } { $_="foo\n"' /dev/null
>   foo
> 
> I figure it has to do with how the -p switch affects the script that
> is passed to the interpreter.  Is this documented anywhere?

from the perlrun manpage:

 -p   causes Perl to assume the following loop around your
      program, which makes it iterate over filename argu�
      ments somewhat like sed:

      LINE:
         while (<>) {
            ...             # your program goes here
         } continue {
             print or die "-p destination: $!\n";
         }

cheers
sc

-- 
stefan stiasny <[EMAIL PROTECTED]> 
In an evolving universe, who stands still moves backwards.

Reply via email to