VingInMedina has asked for the wisdom of the Perl Monks concerning the following question:
I was wondering if it is at all possible to do something like this? (I know this doesn't work)
I am trying to extend the values in the $thing array.
#!/usr/bin/perl use strict; use warnings; my $thing; $thing = { 'A' => 'hello', 'B' => 'there' }; $thing = { 'C' => 'cutie', 'D' => 'pie' }; print "$thing->{'A'} $thing->{'B'} $thing->{'C'} $thing->{'D'}\n";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Extending Array
by moritz (Cardinal) on Mar 21, 2012 at 14:57 UTC | |
by sriharsha.sm (Initiate) on Mar 21, 2012 at 18:53 UTC | |
by moritz (Cardinal) on Mar 21, 2012 at 19:07 UTC | |
Re: Extending Array
by jandrew (Chaplain) on Mar 21, 2012 at 15:12 UTC | |
Re: Extending Array
by VingInMedina (Acolyte) on Mar 21, 2012 at 15:34 UTC | |
by Jenda (Abbot) on Mar 21, 2012 at 23:57 UTC | |
by BrowserUk (Patriarch) on Mar 22, 2012 at 01:11 UTC | |
by Anonymous Monk on Mar 22, 2012 at 03:20 UTC |
Back to
Seekers of Perl Wisdom