[Pdx-pm] Musings on operator overloading (was: File-Fu overloading)

Austin Schutz tex at off.org
Fri Mar 21 14:26:41 PDT 2008


On Thu, Mar 20, 2008 at 09:45:41PM +0100, Aristotle Pagaltzis wrote:
> I dunno. How often have you seen PODs that say “pass a filename
> or filehandle to this sub”? Quite common, no? Well, checking
> whether something is filehandle-ish is quite difficult in Perl,
> and it’s not unusual for code to try to use anything as a
> filehandle that’s a ref.
> 

	Depending on what you are doing sometimes you can use
fileno().

	Austin


More information about the Pdx-pm-list mailing list