Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Display Troubles

by mr_dont (Beadle)
on Oct 09, 2001 at 00:27 UTC ( [id://117546]=note: print w/replies, xml ) Need Help??


in reply to Re: Display Troubles
in thread Display Troubles

I agree with thatguy, and if you are unsure of the exact path to your file (maybe because you are not the admin or whatever), and if it is in the same place as your script, you can always use the CWD module to grab the name of the current working directory...

# Load the current working directory module use Cwd; # set $dir to the current directory my $dir = cwd; # print out the pathname print "My file is: $dir/$value\n";

Replies are listed 'Best First'.
Re: Re: Display Troubles
by blakem (Monsignor) on Oct 09, 2001 at 01:44 UTC
    Sometimes the cwd isn't really what you want, though. If you want to know the directory in which the script resides (rather than the directory one was in when it was executed), a better solution is FindBin.

    -Blake

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-04-20 07:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found