CodeJunkie has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
If I have a data structure like this:
my $reqs = [ HTTP::Request->new('GET', http://www.bbc.co.uk, HTTP::Request->new('GET', http://www.google.com, HTTP::Request->new('GET', http://www.perlmonks.org, HTTP::Request->new('GET', http://www.dhtmlcentral.com, HTTP::Request->new('GET', http://www.lycos.co.uk, ];
Can anyone tell me how I can 'push' a value onto this list, i.e. I want to be able to loop through, say 5 times, pushing a value onto the list like I would push a value on to an array like this.
push @my_array, $value;
Can anyone tell me how to do this... i'm a bit confused with all these references and variables.
Cheers,
Tom.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(jeffa) Re: References and Arrays
by jeffa (Bishop) on Mar 10, 2003 at 22:00 UTC | |
by CodeJunkie (Monk) on Mar 10, 2003 at 22:14 UTC | |
by tachyon (Chancellor) on Mar 11, 2003 at 01:19 UTC | |
by Aristotle (Chancellor) on Mar 11, 2003 at 02:46 UTC |