in reply to Re: Finding missing elements in a sequence (code)
in thread Finding missing elements in a sequence (code)
Ah, I see.
Well, you need to make things equal before comparing them ... you are putting numbers 1..n as keys into %isthere, but try to get out $isthere{"00001"}. That will not work - the keys in %isthere are "1" etc.
This is what you need to make it work:
$isthere{$_} = "yes" for map {$_+0} @list;
Christian Lemburg
Brainbench MVP for Perl
http://www.brainbench.com
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: Finding missing elements in a sequence (code)
by pike (Monk) on Nov 06, 2001 at 21:47 UTC | |
Re: Re: Re: Finding missing elements in a sequence (code)
by deprecated (Priest) on Nov 06, 2001 at 21:38 UTC | |
by clemburg (Curate) on Nov 06, 2001 at 22:07 UTC |
In Section
Seekers of Perl Wisdom