Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: How could you make a script think it's running in its own directory?

by why_bird (Pilgrim)
on Mar 27, 2008 at 10:06 UTC ( [id://676676]=note: print w/replies, xml ) Need Help??


in reply to Re^2: How could you make a script think it's running in its own directory?
in thread How could you make a script think it's running in its own directory?

How does __FILE__ help? Would you use it with chdir?
........
Those are my principles. If you don't like them I have others.
-- Groucho Marx
.......

Replies are listed 'Best First'.
Re^4: How could you make a script think it's running in its own directory?
by parv (Parson) on Mar 27, 2008 at 10:48 UTC

    Just Try It ...

    use File::Basename qw/ fileparse /; print join "\n" , __FILE__ , ( fileparse __FILE__ )[1] ;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-03-29 05:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found