in reply to Push Array
As already explained, unshift is your answer, along with shift, push, and pop.
For a style hint, I'd just like to point the use of qw.
use Data::Dumper; use strict; my $form = {days => [qw( 2011-02-26 2011-02-25 2011-02-24 2011-02-23 2011-02-22 2011-02-21 2011-02-20 )]}; unshift @{$form->{days}}, qw(2011-03-01 2011-02-28 2011-02-27); print Dumper($form);
|
|---|