Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: Introsepcting the current Perl file via DATA, even w/o DATA?

by Anonymous Monk
on Feb 05, 2016 at 01:50 UTC ( [id://1154459]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    BEGIN {
        print "BEGIN\n";
    ...
        print "INIT\n";
    }
    print "MAIN\n";
    
  2. or download this
    open("t.pl", O_RDONLY)                  = 3
    ...
    ...
    write(1, "CHECK\n", 6)                  = 6
    write(1, "INIT\n", 5)                   = 5
    write(1, "MAIN\n", 5)                   = 5
    
  3. or download this
    __DATA__
    whatever
    
  4. or download this
    open("t.pl", O_RDONLY)                  = 3
    ...
    ...
    ...
    close(3)                                = 0
    exit_group(0)                           = ?
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2024-04-20 06:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found