my @extList; push @extList, $_ for @ARGV; #### 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 ||= '.';