$ rm foo{.bak,};echo bar>foo;perl -i.bak -we'sub show { print STDOUT "files: ", join(",", glob("*")), "\nselected: $_\n" and select $_ for select *{"TEMP"} } show; print STDOUT eof() ? "eof\n" : "not eof\n"; show' foo files: foo selected: main::STDOUT not eof files: foo,foo.bak selected: main::ARGVOUT