Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^6: Code asks, in what file do I live?

by dave_the_m (Monsignor)
on Sep 23, 2004 at 21:05 UTC ( [id://393328]=note: print w/replies, xml ) Need Help??


in reply to Re^5: Code asks, in what file do I live?
in thread Code asks, in what file do I live?

Since your example only contained one file, it can't demonstrate whether it's displaying the filename from the correct context, since all contexts will have the same filename.

On the other hand, my example contained two files (well, a file and a -e) and clearly demonstated that the output of (caller(0))[1] was a different filename from the file containing the 'caller' line itself.

Dave.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-16 05:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found