can you reference elements of an array/hash from within that array/
hash for example would
@array=(A, B, C, D, $array[0], E, F)
fly?
Zak
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
On 2011-08-18 16:51, Zak wrote:
can you reference elements of an array/hash from within that array/
hash for example would
@array=(A, B, C, D, $array[0], E, F)
fly?
See Data::Alias and Array::RefElem.
perl -Mstrict -MData::Dumper -MData::Alias -wle '
my @data = qw(A B C D A E F A B B A);
On 18/08/2011 15:51, Zak wrote:
can you reference elements of an array/hash from within that array/
hash for example would
@array=(A, B, C, D, $array[0], E, F)
fly?
You can write
my @array;
@array=('A', 'B', 'C', 'D', \$array[0], 'E', 'F');
What are you trying to do?
Rob
--
To unsub
On 8/18/11 Thu Aug 18, 2011 7:51 AM, "Zak"
scribbled:
> can you reference elements of an array/hash from within that array/
> hash for example would
>
> @array=(A, B, C, D, $array[0], E, F)
>
> fly?
Try it out. See what you get.
The above will not set the fifth element of @array to 'A', how
On 11-08-18 10:51 AM, Zak wrote:
@array=(A, B, C, D, $array[0], E, F)
This is the same as:
{
my @temporary = @array;
@array = ( A, B, C, D, $temporary[0], E, F );
}
--
Just my 0.0002 million dollars worth,
Shawn
Confusion is the first step of understanding.
Programming is as much
". $i . ":" . $sorted->[ $i ]->[ $j ]->[ 1 ] . " had "
. $sorted->[ $i ]->[ $j ]->[ 0 ] . " duplicates\n" if( $sorted->[ $i
]->[ $j ] );
}
}
-- Forwarded message --
From: Rob Dixon
Date: Thu, Aug 18, 2011 at 17:37
Subje
On 2011-08-18 21:58, Dr.Ruud wrote:
On 2011-08-18 16:51, Zak wrote:
can you reference elements of an array/hash from within that array/
hash for example would
@array=(A, B, C, D, $array[0], E, F)
fly?
See Data::Alias and Array::RefElem.
perl -Mstrict -MData::Dumper -MData::Alias -wle '