How to create a dynamic list in Perl -


i've seen several examples online show how use array static size , manipulate information. i'm curious how create list in perl in list's size can dynamic , items can add, e.g. append().

as side note, of tutorials i've found on google seem bit dated, if have suggestion on can learn simple stuff asked in question, please let me know. thanks.

specifically, i'm looking build list of strings, can later reference list's size , iterate through values.

arrays are dynamic in perl.

my @lines = ('line one', 'line two'); push @lines, 'line three'; print $_, "\n" @lines; 

output:

line 1 line 2 line 3 

Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -