So say I created a set of arrays like so:
my (@device, @mount, @type, @options, @dump, @pass) = ();
Then later I wanted to create an array with those arrays inside it. How would I do that? I tried to use:
my @columns = (@device, @mount, @type, @options, @dump, @pass);
and
my @columns = ([@device], [@mount], [@type], [@options], [@dump], [@pass]);
The issue seems to be that @columns remains empty. I feel like I am making a really simple syntax mistake. What have I done wrong?
When you use, you just assign all values from given arrays to array
@columns.Here, you just say all array by reference, if you use Data::Dumper you can see structure of your array
@columns.You can do it using array references. Read this tutorial: perlreftut – Mark’s very short tutorial about references
Then use dereferencing: