in reply to Open Function Question
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
|
|---|