zericm has asked for the wisdom of the Perl Monks concerning the following question:
All,
I've got this pretty simple chunk of code here:
@projectEvents = ($dcrTwigCopy->descendants('tab[@tabType="events" +]')); if (@projectEvents) { print "\n\nWe have an array!\n"; populateEventManifest(@projectEvents, $eventManFh); } sub populateEventManifest { my( @events, $eventManFh ) = @_; foreach my $event (@events) { $event->print($eventManFh); } }
When I do that final print statement to a file handle, I get:
Use of uninitialized value in print at /System/Library/Perl/5.8.8/darwin-thread-multi-2level/IO/Handle.pm line 401.But when I drop the filehandle, it prints fine to STDOUT. Not looking for a specific answer here (I'd rather learn to fish), but some suggestions as to where I should cast my net.
Thanks,
Eric
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: XML::Twig Question (sorta)
by Anno (Deacon) on Mar 28, 2009 at 18:23 UTC | |
|
Re: XML::Twig Question (sorta)
by ikegami (Patriarch) on Mar 28, 2009 at 19:12 UTC |