Pradeep Goel wrote:

> $$$$$$$$$ in NO case a language changes its behaviour for an array with 1
> element
> & the same code with array of 2 or more elements ( what the PERL is doing
> here )
> it does pops out if last element also happens to be the only element of
> array.
>>

You are correct that in NO case should a language act differently for an 
array with different size. Perl is no different, given an array(doesn't 
really matter what the size is), all the array functions(shift, unshift, 
pop, push, etc) will always act according to the specification of the 
language. The key word here is "according to the specification of the 
language", I am not questioning your experience with Perl but it seems to 
me that you are new to Perl and not very familiar with how Perl really 
works. That's the reason why you suspect this is a bug. As you learn and 
use more and more of Perl, you will probably know that this isn't a bug. In 
fact, this behavior has been documented explicitly in perldoc. If perldoc 
is aware of this but doesn't categorize it as bug, it isn't bug. Make 
sense?

If you come from C, I will bet that you will find more and more Perl "bugs" 
as you learn and use Perl. Perl is never design to echo C (or most of the 
programming languages out there). As you use Perl more and more, you will 
notice that those are the features of the language, not bugs. That's what 
set Perl aside from the others and one of the reason why Perl can be very 
productive once you really know it well.

I am not saying that Perl is bug-free. Perl does have bugs and every minor 
or major release of Perl will usually fixed many of them. I just don't 
think what you experience is a bug. 

david

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to