You could do this:
my $fh; open($fh, ...);
open will put a ref to an anonymous file handle into $fh. You can then use $fh anywhere a file handle can be used.
(I think it actually puts in a File::IO object reference.)
But I don't know why there isn't a sigil for file handles. Maybe Larry et al didn't want to dedicate a character for that?
In reply to Re: Why don't file handles have sigils?
by RonW
in thread Why don't file handles have sigils?
by 1s44c
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |