open( my $find, ... ) # (same as above, without redirecting to "/dev/null") my @array = <$find>; # reads all lines into array chomp @array; # strips linefeeds from all array elements