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.