On Tue, 26 Oct 2004 11:33:24 +0200, Bastian Angerstein
<[EMAIL PROTECTED]> wrote:
>
> Why does this don�t work in my Script?
>
> open (TEST, "</tmp/test.txt");
> while (<TEST>) {
> print $_;
> # or just
> print;
> }
You are making the assumption that '<TEST>' sets '$_' which is not
true. Oddly, perl makes '<>' set $_, but not <FILE>... dunno why
consider
while( $_ = <TEST> ) {
}
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> <http://learn.perl.org/> <http://learn.perl.org/first-response>
>
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>