actually, from what i understand, while (<ARGV>) and while (<>) are special syntaxes.  
as soon as you add the &&, perl doesn't interpret it in the special way (ie. setting 
$_ to each line of the file)

i usually do this:

while (<>)
{
        last if /End of list/;
        bla
        bla
        bla
}

-----Original Message-----
From: Guilherme Pinto [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 11, 2001 2:12 PM
To: 'Sebadamus'; [EMAIL PROTECTED]
Subject: RE: Simple question about "whiles" and files...


while (<ARGV> and  $_ =! /End of list/)

Try that...

> -----Original Message-----
> From: Sebadamus [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 11, 2001 12:27 PM
> To: [EMAIL PROTECTED]
> Subject: Simple question about "whiles" and files...
> 
> 
> Does anybody knows why I cant make this to work as I want? :-)
> 
> while (<ARGV> and  $_!=~/End of list/)
> {
>     bla
>     bla
>     bla
> }
> 
> So, with this I want to process the file in <ARGV> until EOF, 
> and each line
> must be distinct than "/End of list/".  So, if it is EOF or 
> the current line
> is that string... the WHILE should exit...
> 
> Can anybody HELLLLLPPP me...?
> 
> Thanks you very much,
> 
> Sebastian.
> 

Reply via email to