in reply to Re: problem with array
in thread problem with array
Note the \$str trick is just to avoid requiring a file external to the sample code.
I tend to open the filehandle directly on a reference to the heredoc to avoid using a variable. You may consider that is going too far :-)
open my $inFH, q{<}, \ << 'EOD' or die qq{open: << heredoc: $!\n}; .... .... EOD
If the filehandle was to be opened in some inner scope I would use a variable as you have done to avoid the heredoc messing up indentation.
Cheers,
JohnGG
|
|---|