perl add to array
Adding Elements to an Array in Perl
To add elements to an array in Perl, you can use the push
function. Here's an example:
my @array = (1, 2, 3);
push @array, 4;
This will add the element 4
to the end of the array @array
[[SOURCE 1]].
That's it!