in reply to Returning two records with SELECT statement and then printing to file

Win,

You attempt to print to the (undeclared) filehandle OUTPUT without opening it first. Read perlopentut.

use strict; use warnings; my $FILEHANDLE = undef; open ($FILEHANDLE, "> you.win.again.txt") or die "open failed"; print $FILEHANDLE "I couldnt figure why\n"; print $FILEHANDLE "You couldnt give me what everybody need\n"; print $FILEHANDLE "I shouldnt let you kick me when I'm down\n"; print $FILEHANDLE "My baby\n"; close $FILEHANDLE or die "close failed"; __END__
--
Andreas