I have seen .pl, .pm (perl module), .cgi. Others with more experience than me would have seen more.

You don't need to associate them as in UNIX/Linux the shebangs line takes care of it.

If you put #!/usr/bin/perl -w or whatever is approripate for your system based on where Perl is installed as the first line in your script, the shell will automatically execute the file for you when invoked from the command line.

Agreed, extensions are useful for searching and it is totally a personal preference and so nothing is enforced when it comes to Perl.

If you are looking for perl files and you did not have an extension, you can look for things "inside" the code while searching for all files. In UNIX you do it with the find | xargs grep commands. In Window$ you can bring the find utility and use the containing text box to search.

If you have been use my in your code then searching for my $ might help. Watch out when you do that in unix as $ should be escaped in std grep.

NOTE: Searching all the files for text will take too long! (depends on where and how many files you search)

-SK


In reply to Re: Conventional filename suffixes by sk
in thread Conventional filename suffixes by dbae

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.