Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: XML::Twig output to filehandle

by poolpi (Hermit)
on Feb 13, 2009 at 08:30 UTC ( #743554=note: print w/ replies, xml ) Need Help??


in reply to Re: XML::Twig output to filehandle
in thread XML::Twig output to filehandle

When modifying special variables, it's a good idea to localize them and shorten the scope.

See perlvar

Update:
I was thinking of $/


hth,
PooLpi

'Ebry haffa hoe hab im tik a bush'. Jamaican proverb


Comment on Re^2: XML::Twig output to filehandle
Download Code
Re^3: XML::Twig output to filehandle
by mirod (Canon) on Feb 13, 2009 at 08:41 UTC

    If you are talking about $_ in the handler, it _is_ localized (and set) by XML::Twig, so no worries there.

      I think its $/ from
      undef $/; my $XML = <DATA>;

        Oh yeah, I missed that one. It's obviously only there for the code example though. I hope the OP doesn't store the real data in the DATA section of the code!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://743554]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2015-07-02 23:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (47 votes), past polls