in reply to store multiple files in multidimensional array

This stuffs all file contents into a hash-of-arrays:
use warnings; use strict; use File::Slurp; my %data; for (glob '*') { push @{ $data{$_} }, read_file($_); }

See also:

Same with array-of-arrays:

my @data; for (glob '*') { push @data, [ read_file($_) ]; }