From: Paul Johnson <[EMAIL PROTECTED]>
> On Tue, Dec 03, 2002 at 04:40:37PM +0100, Jenda Krynicky wrote:
>
> [ Rearranging slightly to get your summary first ]
>
> > The documentation says you should not do it. Not because it would be
> > that hard to say what happens (once you understand what di
On Tue, Dec 03, 2002 at 04:40:37PM +0100, Jenda Krynicky wrote:
[ Rearranging slightly to get your summary first ]
> The documentation says you should not do it. Not because it would be
> that hard to say what happens (once you understand what did I say
> above), but because it would be easy to
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 tha
> > PRADEEP GOEL said:
> > > 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 { $
From: "PRADEEP GOEL" <[EMAIL PROTECTED]>
> $ 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.
Differ
> >
> I am really sorry if I am appearing offensive ,
> I never meant to be .
Nope just curious I take it...
> In perlsyn documen it does says " Don't do that " else it will get "
> confused"
> & quite below it says a C programmer does this - while same can be written
> in perl as this
> ( a
- Original Message -
From: "PRADEEP GOEL" <[EMAIL PROTECTED]>
To: "Paul Johnson" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, December 03, 2002 12:57 PM
Subject: Re: a Bug in PERL
> >
> > Patient: Doctor, it hurts when
- Original Message -
From: "PRADEEP GOEL" <[EMAIL PROTECTED]>
To: "Paul Johnson" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, December 03, 2002 6:27 PM
Subject: Re: a Bug in PERL
>
> - Original Message -
> From: &
PRADEEP GOEL said:
>> > & also that any programming language must follow some sure
>> mathematical
>> > rules & should not get confused .
>>
>> The rule is "don't do that". Most languages have rules like that for
>> various situations. In C, for example, a statement such as i = i++ is
>> unede
- Original Message -
From: "Paul Johnson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, December 03, 2002 5:13 PM
Subject: Re: a Bug in PERL
>
> PRADEEP GOEL said:
> >
> > - Original Message --
PRADEEP GOEL said:
>
> - Original Message -
> From: "Paul Johnson" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Monday, December 02, 2002 5:01 PM
> Subject: Re: a Bug in PERL
>
>
>>
>> P
- Original Message -
From: "Christopher D.Lewis" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, December 02, 2002 8:34 PM
Subject: Re: a Bug in PERL
> Perhaps what the user intends is a WHILE loop.
>
> while (@las
- Original Message -
From: "Paul Johnson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, December 02, 2002 5:01 PM
Subject: Re: a Bug in PERL
>
> PRADEEP GOEL said:
> > If i am not wrong somewhere , th
Perhaps what the user intends is a WHILE loop.
while (@lastnotpop)
{
$current_element = pop(@lastnotpop);
print "Just Popped $current_element\n";
}
This does what you want via pop. For a while loop, leave the array as
it is, and just iterate through it.
Enjoy,
Chris
On Monday, December 2, 200
PRADEEP GOEL said:
> 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
15 matches
Mail list logo