in reply to Re^4: Reading from filehandles in a loop and matching lines
in thread Reading from filehandles in a loop and matching lines

Declare those variables as lexical variables, i.e. put my before the first occurrence.  And put a semicolon at the end of the prints:

... while (my $line = <EMPLOYEES>) { chomp $line; my ($name,$department, $salary) = split /\t/, $line; print "n=$name\n"; print "d=$department\n"; print "s=$salary\n"; ...