Hi,
I don't know how to tell perl EOF, i am doing a search in a file like this:
$username eq 'wagner';
$file = 'c:\file';
open(INFO, $file);
do
{
$lines = ;
chop $lines;
}
while ($lines !~/$username/);
close(INFO);
The problem is if the file doesn't have a line with the word "wagner" it
beco
> -Original Message-
> From: Wagner Garcia Campagner [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 08, 2001 12:27 PM
> To: [EMAIL PROTECTED]
> Subject: End of File
>
>
> Hi,
>
> I don't know how to tell perl EOF, i am doing a search in a
> file like this:
>
>
> $username eq
On Thu, 8 Nov 2001, Wagner Garcia Campagner wrote:
> I don't know how to tell perl EOF, i am doing a search in a file like this:
You don't need to -- you can loop through a file and it will stop
automatically when EOF is reached.
>
> $username eq 'wagner';
> $file = 'c:\file';
>
> open(INFO, $f
Hi,
The code you have should work, but you might want to use the opendir function
because your current code does not display, hidden files and files you
don't have read access on
This code does:
opendir(DIR,"/path/to/files") || die "Unable to read from directory.\n";
while ( defined ($filename