BEGIN{ @ARGV = map glob, @ARGV } while( <> ) { ... } #### perl -eBEGIN{@ARGV=map{glob}@ARGV} -nle"1" a*.pl b*.pl