Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Validate array of numbers in sequence

by cLive ;-) (Prior)
on Sep 08, 2003 at 11:21 UTC ( [id://289741]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Validate array of numbers in sequence
in thread Validate array of numbers in sequence

Fair point. Just switch things around a little...
my %hash; @hash{1..@list}=1; delete $hash{$_} for (@list);

Funny, this was how I did it originally, but I thought the other way round looked prettier :)

cLive ;-)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2024-04-20 04:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found