Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^3: conditional self-execution

by Anonymous Monk
on Jan 28, 2008 at 08:10 UTC ( [id://664646]=note: print w/replies, xml ) Need Help??


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

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

Replies are listed 'Best First'.
Re^4: conditional self-execution
by apotheon (Deacon) on Jan 28, 2008 at 08:13 UTC
    exactly the same thing in perl

    When you misquote me ("something else" instead of what I actually said: "something to that effect"), that sure does seem like it's the case.

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

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

      Except that it cannot be interpolated (not unreasonably).
        "This string varies depending on @{[__FILE__]}."

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

        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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-18 19:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found