Perl - How do I update (and access) an array stored in array stored in a hash?
问题 Perhaps I have made this more complicated than I need it to be but I am currently trying to store an array that contains, among other things, an array inside a hash in Perl. i.e. hash -> array -> array use strict; my %DEVICE_INFORMATION = {}; #global hash sub someFunction() { my $key = 'name'; my @storage = (); #assume file was properly opened here for the foreach-loop foreach my $line (<DATA>) { if(conditional) { my @ports = (); $storage[0] = 'banana'; $storage[1] = \@ports; $storage[2] = '0