This is not a Perl problem, but a shell problem.

When you type a command in Unix with no path specification, the shell looks in the directories contained in your PATH environment variable to find it, and _only_ in those directories. If you come from the DOS world, this can be confusing because DOS looks in the PATH and by default it also looks in the current directory. Unix shells do not look in the current directory by default, you have to specifically add "." to your path ("." represents the current directory).

So your problem is that "." is not in your PATH, so when you type "scriptname.pl" the shell does not find it. You can either type the path name explicitly:

./scriptname.pl
or add "." to the end of your path:
PATH=${PATH}:. export PATH scriptname.pl
If you add "." to your path, make sure you add it at the end and not at the beginning. Adding it at the beginning can be a source for (at best) pranks and (at worst) security problems.

In reply to Re: extreme newbie question by ZZamboni
in thread extreme newbie question by jkellington

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.