bradcathey has asked for the wisdom of the Perl Monks concerning the following question:
Fellow Monasterians,
In a CGI::App module, I have
$self->session->param('promo_item' => 'member');
but I want to add (aka 'push') an element to an array ref, on the fly, to achieve, in effect:
$self->session->param('promo_item' => [ 'member','visitor']);
Tried stuff like
$self->session->param('promo_item')->[1] = 'visitor';
but, of course, no dice. Ideas? Thanks in advance.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to add an element to a session param
by rhesa (Vicar) on Apr 21, 2007 at 00:40 UTC | |
|
Re: How to add an element to a session param
by bobf (Monsignor) on Apr 21, 2007 at 02:42 UTC | |
|
Re: How to add an element to a session param
by NetWallah (Canon) on Apr 21, 2007 at 00:37 UTC |