use IO::File; my @list = map { IO::File->new($_) or die("ack: $!") } @ARGV;