develooper Front page | perl.perl5.porters | Postings from July 2008

Re: Alarums and Excursions

Thread Next
From:
Sean O'Rourke
Date:
July 28, 2008 16:05
Subject:
Re: Alarums and Excursions
Message ID:
m2od4hd375.fsf@cs.ucsd.edu
Glenn Linderman <perl@NevCal.com> writes:
> Nary a "while(<>)" in sight in that code snippet.

Here's "perl -MO=Deparse -lan" of that.  Note the second part:

BEGIN {           for (@ARGV) {
    if (/\.gz$/) {
      $_ = "gzip -dc $_ |";
    }
  }
}

BEGIN { $/ = "\n"; $\ = "\n"; }
LINE: while (defined($_ = <ARGV>)) {
    chomp $_;
    our(@F) = split(" ", $_, 0);
    sub BEGIN {
        foreach $_ (@ARGV) {
            if (/\.gz$/) {
                $_ = "gzip -dc $_ |";
            }
        }
    }
    ;
}


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About