A question has been posed to me that I am not sure how to go about it and searches on perldoc.perl.org and here have not turned up what I am seeking. (Or I haven't put in the correct question.) And I am seeking wisdom Much greater than my own. (I'm making an assumption I have some form of wisdom)

I have a routine at \u\site1\program\routine.
This routine uses an answer file, and the default answer file is located also, in \u\site1\program\, with the routine.
When it is called, there are 2 ways to call it.
1- by invoking \u\site1\program\routine and the default answer file is used.
2- Invoking the routine, followed by another path if a user has a customized answer file,
IE: \u\site1\program\routine \u\site2\userfolder\answerfile

I understand system calls for the user such as getting the user name, or pwd. But I only understand it as a local function when the user is running a routine from the directory they are in. In this case, this is a company wide used routine, used by many. The desire is for users to have their own answer files in their own directories, and invoke the routine, but rather than the users actually typing out the path to their own answer file, ('cause ya know, copying and pasting can be tough some days) have the routine 'know' where the location the user is in when they invoke it. (Assumption or Rule: The user will be in the directory their answer file is located.)

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?

Thanks all. Bruce


In reply to Locating A Users Current Remote Directory by brusimm

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.