Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re^2: printing sub return values to a fileby JadeNB (Chaplain) |
on Nov 19, 2009 at 16:15 UTC ( [id://808196]=note: print w/replies, xml ) | Need Help?? |
I think it will give a single element containing an empty stringNot that it much matters, but it probably returns 1 (the return value of a successful print). The exceptions are if print fails for some reason, or if the file handled by $fh is empty—in which latter case I would have guessed that the return value would be $fh, but Data::Dumper suggests that it's ''—or, I suppose, if $fh isn't a readable filehandle, in which case something else happens.
In Section
Seekers of Perl Wisdom
|
|