Just another Perl shrine | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Within a module (say a.pm) used from a program (say b.pl), __FILE__ will be a.pm but $0 will be b.pl. The test you posted checks whether the file that contains it is being run as a 'main' program, or is being used or required, or done or eval'd. With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In reply to Re: Difference between $0 and __FILE__
by BrowserUk
|
|