Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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 ( #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? | Other CB clients
Other Users?
Others about the Monastery: (2)
As of 2022-05-22 12:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (80 votes). Check out past polls.

    Notices?