This is quite off-topic, since it has nothing really to do with Perl, yet, I'll try to help you out.

Launching a ./Program.pl means, "Please, shell, launch the script Program.pl which is located in ./" The dot-slash means the current directory you're in. You could use /home/Programs/Program.pl in any directory, but that's quite annoying to type every time.

If you set the path in your ~/.tcshrc, as specified, you should be able to call Program.pl without a problem (drop the dot-slash in front of it).

Another thing that strikes me as odd, is the fact that you speak of a ~/.tcshrc (tcshell), yet the error is coming from bash (another shell). So you probably want to add the following line in your ~/.bash_profile:

PATH=$PATH:/home/Programs export PATH

This way, you alter the path for bash (which you seem to use anyway). Save these additions to ~/.bash_profile (or ~/.profile) and the next time you login, you can launch your script by typing "Profile.pl" :)

--
b10m

In reply to Re: setting path to perl script in UNIX by b10m
in thread setting path to perl script in UNIX by erratic

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.