Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Returning two records with SELECT statement and then printing to file. Best way?

by andreas1234567 (Vicar)
on Dec 07, 2007 at 13:06 UTC ( [id://655638]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://655638]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2024-04-25 15:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found