I 2nd dws's response - the very 1st thing you need to do is find out where Perl is installed. I have no experience on OS X, but, try
perl -V
at a command prompt - that will print out the @INC array, which tells you the directories that Perl will search for modules.
Also, on Linux you can do
which perl
at a command prompt. That will display something like this:
/usr/bin/perl
and that is what you should include in your #! line at the very top of each perl script. #!/usr/bin/perl -w.
Once you've got that shebang line right, then if you do
chmod +x my_program
and then
./my_program
it should run - hopefully.
Again, I have no experience with OS X, so I don't know how much similarity it has to Unix/Linux.
HTH.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.