in reply to Re^4: Sorting an array of hashes
in thread Sorting an array of hashes
Update: I didn't read your post carefully enough
You get the result you want, but the semantic is not what you indicate by using exists so I'd rather use defined in that case.
Run it to produce:
#! perl
use warnings;
use strict;
my @x = (1,2,3,4,5);
delete $x[2];
for (0..4) { print $x[$_] }
So, the element exists, but it's value is undefined.Use of uninitialized value in print at checkifexists.pl line 6.
1245
|
---|
In Section
Seekers of Perl Wisdom