Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: how to add a PPI:Statement to a document?

by Anonymous Monk
on Jan 02, 2008 at 07:20 UTC ( #659918=note: print w/ replies, xml ) Need Help??


in reply to Re: how to add a PPI:Statement to a document?
in thread how to add a PPI:Statement to a document?

$Document = PPI::Document->new(\'print "Hello World!\n"'); $lastVar->insert_after( $Document->find_first('Statement') );
A little more verbose, but much clearer in intent.


Comment on Re^2: how to add a PPI:Statement to a document?
Download Code
Re^3: how to add a PPI:Statement to a document?
by Anonymous Monk on Jan 02, 2008 at 07:28 UTC
    In fact, you also should just throw away the other document immediately.
    $lastVar->insert_after( PPI::Document->new('print "Hello World!\n")->f +ind_first('Statement') );
Reaped: Re^3: how to add a PPI:Statement to a document?
by NodeReaper (Curate) on Sep 15, 2011 at 04:23 UTC

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2014-07-29 03:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (211 votes), past polls