use Data::Dumper; # you could put this at start of script print Dumper(\@all_matches);