Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Reading the script code from itself

by hdb (Parson)
on May 28, 2014 at 12:33 UTC ( #1087644=note: print w/ replies, xml ) Need Help??


in reply to Reading the script code from itself

If you add a __DATA__ segment at the end, and rewind the DATA handle, you can read your code:

use strict; use warnings; seek( DATA, 0, 0 ); print while( <DATA> ); __DATA__


Comment on Re: Reading the script code from itself
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (14)
As of 2014-07-30 12:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (231 votes), past polls