Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re^5: conditional self-execution

by cdarke (Prior)
on Jan 28, 2008 at 09:25 UTC ( #664656=note: print w/ replies, xml ) Need Help??

in reply to Re^4: conditional self-execution
in thread conditional self-execution

__FILE__ is exactly the same thing in perl: a variable, a constant, or something else.

Except that it cannot be interpolated (not unreasonably).

Comment on Re^5: conditional self-execution
Re^6: conditional self-execution
by apotheon (Deacon) on Jan 28, 2008 at 10:21 UTC

    Thus, it is not "something to that effect", but it is "something else".

    print substr("Just another Perl hacker", 0, -2);
    - apotheon
    CopyWrite Chad Perrin

Re^6: conditional self-execution
by halley (Prior) on Jan 28, 2008 at 15:49 UTC
    "This string varies depending on @{[__FILE__]}."

    [ e d @ h a l l e y . c c ]

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2015-02-27 06:12 GMT
Find Nodes?
    Voting Booth?

    On my keyboard, Caps lock is:

    Results (439 votes), past polls