Front page | perl.beginners |
Postings from December 2002
a Bug in PERL
Thread Next
From:
PRADEEP GOEL
Date:
December 2, 2002 03:01
Subject:
a Bug in PERL
Message ID:
091001c299f2$2fe6deb0$69734c0f@NT15105
If i am not wrong somewhere , there is a bug come to my notice , in PERL
@lastnotpop = ("where_gone_me","remaining_is_alright","no_fear_now");
foreach $faltu (@lastnotpop) #$faltu is extra doesn't makes difference even
if removed
{ $pch = pop(@lastnotpop );
print " \n can't pop last one from @lastnotpop i.e.($lastnotpop[0] ) :
popped element is $pch #";
}
If there are more than one elemnt in a array(say @lastnotpop than the
last/first element i.e.
$lastnotpop[0] can't be popped out in this single foreach loop.
I don't think it's intensional feature , else it should also not be able to
pop the only
element , if it has one , but it does.
Regards
Pradeep
Thread Next
-
a Bug in PERL
by PRADEEP GOEL