p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Perl (http://p2p.wrox.com/forumdisplay.php?f=196)
-   -   need self testing questions (http://p2p.wrox.com/showthread.php?t=41502)

netcat April 20th, 2006 12:07 AM

need self testing questions
 
Hello all,

Please send me some self testing perl questions.

Many Thanks
Jagadeesh


Many Thanks
Jagadeesh

ciderpunx April 22nd, 2006 06:21 AM

What does the following code do and why does it work (assume the arrays @A and @B exist):

my %s;
my @answer;

@s{@B} = ();

for (@A) { push(@answer, $_) unless exists $s{$item}; }

--
Don't Stand on your head - you'll get footprints in your hair
                                           http://charlieharvey.org.uk
                                              http://charlieharvey.com


All times are GMT -4. The time now is 06:00 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.