AW: Reading from a filehandle in while-loop

From: Bastian Angerstein (ang_at_nmc-m.dtag.de)
Date: 10/26/04


To: <beginners@perl.org>
Date: Tue, 26 Oct 2004 12:03:30 +0200

Joop,
if I use open... or die "$!" i see that the file is opened correctly but nothing is in $_.

-----Ursprüngliche Nachricht-----
Von: Flemming Greve Skovengaard [mailto:dsl58893@vip.cybercity.dk]
Gesendet: Dienstag, 26. Oktober 2004 11:45
An: beginners@perl.org
Cc: Bastian Angerstein
Betreff: Re: Reading from a filehandle in while-loop

Bastian Angerstein wrote:
> Why does this don´t work in my Script?
>
> open (TEST, "</tmp/test.txt");
> while (<TEST>) {
> print $_;
> # or just
> print;
> }
>
>

Does the file exists and can you read it?

-- 
Flemming Greve Skovengaard            The killer's breed or the Demon's seed,
a.k.a Greven, TuxPower                The glamour, the fortune, the pain,
<dsl58893@vip.cybercity.dk>           Go to war again, blood is freedom's stain,
4112.38 BogoMIPS                      Don't you pray for my soul anymore.


Relevant Pages

  • AW: IE Denial of service (sorta)
    ... Gesendet: Dienstag, 04. ... Dezember 2001 23:00 ... Betreff: ...
    (Vuln-Dev)
  • AW: VI Question
    ... Gesendet: Dienstag, 29. ... Betreff: VI Question ...
    (AIX-L)
  • Summary: Building monitor on Tru64 5.1b-PK3
    ... Thomas Hummel ... Gesendet: Dienstag, 5. ... Oktober 2004 16:17 ...
    (Tru64-UNIX-Managers)
  • AW: IE Denial of service (sorta)
    ... Gesendet: Dienstag, 04. ... Dezember 2001 23:00 ... Betreff: IE Denial of service (sorta) ...
    (Vuln-Dev)
  • Fehler bei Mailversand
    ... Ihre Nachricht hat keine oder nicht alle Empfänger erreicht. ... Gesendet: 13.08.2007 13:09 ... Fehler bei der SMTP-Kommunikation mit dem E-Mail-Server des Empfängers. ... Betreff: Fw: Betreff ...
    (microsoft.public.de.exchange)