Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^2: XML::Twig output with delimiter

by pankaj_it09 (Scribe)
on Dec 10, 2008 at 06:17 UTC ( [id://729337]=note: print w/replies, xml ) Need Help??


in reply to Re: XML::Twig output with delimiter
in thread XML::Twig output with delimiter

Yes it solved the problem to some extent but I want the result to be in a variable.

I tried like this :

my $content = sprintf $para->text()."\n";

It doesn't seem to work.

Replies are listed 'Best First'.
Re^3: XML::Twig output with delimiter
by mirod (Canon) on Dec 10, 2008 at 07:53 UTC

    Once again... read the docs. perldoc -f sprintf. If the text of the element includes a % you won't get what you want.

    You don't need sprintf at all in this case. my $content = $para->text()."\n"; will do just fine.

Re^3: XML::Twig output with delimiter
by pankaj_it09 (Scribe) on Dec 10, 2008 at 06:45 UTC
    Yes it works that way.

    If there is any other way then tell me.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-04-25 12:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found