in reply to Count file lines in a directory tree

my @extList; push @extList, $_ for @ARGV;
How is that different from  my @extList = @ARGV; (other than being less efficient)?

I'd do

use Getopt::long; my @extList; my $root; GetOptions( 'ext=s' => \@extList, 'root|dir=s' => \$root, ); @extList = @extList ? map { split /,/ } @extList; # in case of --ext foo,bar : qw( pl pm ); $root ||= '.';

We're building the house of the future together.

Replies are listed 'Best First'.
Re^2: Count file lines in a directory tree
by GrandFather (Saint) on Nov 09, 2005 at 00:50 UTC

    Brain fart! :( Thanks for the sanity check.


    Perl is Huffman encoded by design.