Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^5: Sorting an array of hashes

by stiller (Friar)
on Mar 27, 2008 at 10:57 UTC ( #676688=note: print w/replies, xml ) Need Help??


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.

#! perl use warnings; use strict; my @x = (1,2,3,4,5); delete $x[2]; for (0..4) { print $x[$_] }
Run it to produce:
Use of uninitialized value in print at checkifexists.pl line 6. 1245
So, the element exists, but it's value is undefined.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://676688]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (9)
As of 2020-08-06 07:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which rocket would you take to Mars?










    Results (39 votes). Check out past polls.

    Notices?