in reply to question about star character in Perl
open (my $XML, "<", $xml_file) or die "File open failed ($xml_file): +$!; get_data($XML, \%hash);
The indirect filehandle makes passing and stashing much cleaner (IMHO). See also open and Indirect Filehandles in perlopentut.
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: question about star character in Perl
by dicty (Sexton) on Jan 18, 2013 at 17:03 UTC |