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;
In reply to can't open a file? by tuvalb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |