Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^4: conditional self-execution

by apotheon (Deacon)
on Jan 28, 2008 at 08:13 UTC ( #664647=note: print w/ replies, xml ) Need Help??


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

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


Comment on Re^4: conditional self-execution
Re^5: conditional self-execution
by cdarke (Prior) on Jan 28, 2008 at 09:25 UTC
    __FILE__ is exactly the same thing in perl: a variable, a constant, or something else.

    Except that it cannot be interpolated (not unreasonably).

      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

      "This string varies depending on @{[__FILE__]}."

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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (15)
As of 2014-09-02 11:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (22 votes), past polls