in reply to can't open a file?

This note is to echo what ikegami said- This is one of the most important things you have to do as you learn perl.. 'use strict;' - use that. Just believe..

Here's your script rewritten with strict.. (untested)

#!/usr/bin/perl use strict; open (FILE, 'data.txt'); while (<FILE>) { chomp; my ($name, $email, $phone) = split(/\s/); # split on whitespace print "Name: $name\n"; print "Email: $email\n"; print "Phone: $phone\n"; print "---------\n"; } close (FILE); exit;