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

Python Kivy ListView: How to delete selected ListItemButton? -

asp.net mvc 4 - A specified Include path is not valid. The EntityType '' does not declare a navigation property with the name '' -