You can, if you wish, open the filehandle against a reference to the HEREDOC.
$ perl -e ' -> open $fh, q{<}, \ <<EOD or die qq{open: <<HEREDOC: $!\n}; -> abc -> def -> EOD -> print qq{$.: $_} while <$fh>;' 1: abc 2: def $
I hope this is of interest.
Cheers,
JohnGG
In reply to Re: Open Function Question
by johngg
in thread Open Function Question
by bichonfrise74
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |