Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: Locating A Users Current Remote Directory

by ferreira (Chaplain)
on Apr 12, 2007 at 20:31 UTC ( #609742=note: print w/replies, xml ) Need Help??

in reply to Locating A Users Current Remote Directory

Is there a function or methodology for the user to invoke the routine, but having the routine locate OR understand where the user is running the routine from or is this even doable?
I am not 100% sure I fully understood your problem (mainly the thing about "current remote directory"), but if it is to determine the home directory of some user, this functionality is included in File::HomeDir. It may not be perfect all the time (as the documentation itself says), but it may be a good departing point.

If it fits you, probably all you have to do is

use File::HomeDir; $home = File::HomeDir->users_home('foo');

Replies are listed 'Best First'.
Re^2: Locating A Users Current Remote Directory
by brusimm (Pilgrim) on Apr 13, 2007 at 14:26 UTC
    ferreira: I'm not determining just the home directory, but the exact directory a user has navigated to, to be able to run the procedure noted and have it use the answer file in that directory. It may not even be that users own directory structure they run the procedure from.

    Here's another example: I am calling a routine:
    \u\user100\idaho\perl\functions\ But I am calling it from:

    I want to enable an option in to know the exact location I am in when I invoke it so it looks for an answer file at my location.

    (This whole question is brought about because some users don't want to have to type the path to their own answer files.)

    btw: Thanks Ikegami for your time.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (1)
As of 2023-01-29 06:40 GMT
Find Nodes?
    Voting Booth?

    No recent polls found