in reply to Why don't file handles have sigils?
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?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Why don't file handles have sigils?
by 1s44c (Scribe) on Jul 08, 2014 at 23:18 UTC | |
by perlfan (Parson) on Jul 09, 2014 at 03:18 UTC |