package Glob::Auto; use strict; BEGIN { @ARGV or return; # done if no arguments @ARGV = map { -e ? $_ : glob $_ } @ARGV; # glob anything that doesn't exist } 1;