#perl - Sun 18 Mar 2007 between 00:56 and 01:08



killer_how do I print to it? open (FH, ">$fh) ?
f00li5hkiller_: no.
thrigprint $fh "yadda\n";
f00li5hkiller_: print $fh "stuff"
killer_ok and how do I close it..
f00li5hkiller_: just let it go out of scope
killer_close ($fh)
f00li5hkiller_: or call close ( $fh )
peshaltoheh
killer_hmm..
thrigprint $fh "dum dee doo\n" or die "whoa! something very not right with system: $!"
f00li5hs/ (/(/
peshaltofound a web host that offers perl with a $9.99 account, and
for a $19.99 account, you get "perl syntax checker"
f00li5hkiller_: http://search.cpan.org/~tjenness/File-Temp-0.18/Temp.pm#OBJECT-ORIENTED_INTERFACE
shortenf00li5h's url is at http://xrl.us/vddu
peshaltoguess they don't know about -c
f00li5hpeshalto: i think the "perl syntax checker" is a person they pay to read your code
peshaltohaha
killer_f00li5h: I have this $fh = new File::Temp( TEMPLATE => $prefix, DIR => $SCOREDIR, SUFFIX => '.txt'); and I need to use it in a few subroutines
f00li5hkiller_: use what? the file?
killer_f00li5h: use the filename that is created
saaibkiller_, $filename is not a string dude, File::Temp returns an object reference not a scalar
thrigpass the filehandle around
f00li5hkiller_: use the file handle, right?
killer_: why do you want to use the /name/?
killer_saaib: that would be my problem
f00li5hyou don't want to open it bundles of times
killer_I need to open the file to print to it, then I need to save the filename in the mysql db
saaibkiller_, yes, when you're trying to open (), the reference to $filename is not the file path name is an object
so, you might want to check the code return from open
it obviously doesn;t die
thrigwhy save some data outside MySQL?
killer_so if I don't "open(), and just print $fh ""; the file should get created.. then I can open() it in another sub if needed
saaib$VAR1 = bless( \*{'File::Temp::$fh'}, 'File::Temp' );
killer_ok.. I also need $fh to be changed from a reference to the actual string so I can store it in the mysql db, how do I do this
saaibcorrect, you can use $filename as a file handle
killer_saaib: f00li5h: cool... I added print $fh ""; after $fh = new File::Temp.... and it works
f00li5hthrig: derrived data doesn't go in your database
killer_still puzzled why I have no commandline output "Content-type: text/html" it works from the browser I get a correct page display

Page: 5 12 19 26 33 40 47 54 61 68 75 82 89 

IrcArchive