tuvalb has asked for the wisdom of the Perl Monks concerning the following question:
but then I get: readline() on closed filehandle FILE at Readfile1.pl line 4 why is that? what's wrong? 10x, Tuval#!/usr/bin/perl open (FILE, 'data.txt'); while (<FILE>) { chomp; ($name, $email, $phone) = split("\t"); print "Name: $name\n"; print "Email: $email\n"; print "Phone: $phone\n"; print "---------\n"; } close (FILE); exit;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: can't open a file?
by Bloodnok (Vicar) on Oct 01, 2009 at 22:40 UTC | |
|
Re: can't open a file?
by Anonymous Monk on Oct 01, 2009 at 22:35 UTC | |
|
Re: can't open a file?
by ikegami (Patriarch) on Oct 02, 2009 at 04:33 UTC | |
|
Re: can't open a file?
by leocharre (Priest) on Oct 02, 2009 at 15:57 UTC |