Programming Tips - perl: How to prepend/append on a array

Date: 2011aug29 Language: perl Q. perl: How to prepend/append on a array (Add at the start of an array, add at the end of an array.) A. Prepend with unshift() - eg:
my(@a); unshift(@a, 'three'); unshift(@a, 'two'); unshift(@a, 'one');
is the same as @a = qw(one two three) A. Append with push() - eg:
my(@a); push(@a, 'one'); push(@a, 'two'); push(@a, 'three');
is the same as @a = qw(one two three)