Permissions!

The biggest thing that gets me between the platforms has been the concept of permissions. As others have pointed out, you can't just type "something.pl" and press enter and expect it to run.. linux has no idea that .pl is anything significant. Hence the initial #!/usr/bin/perl line at the top of your program.

But that's only half the story. The most important thing is setting the permissions of the file such that linux knows that the file is executable. You check the permissions of the files in your directory with ls -al and look for the x permission (meaning executable). If it's not there for your script you may want to change it using the chmod command (check the documentation by typing man chmod at the command line in linux).


In reply to Re: Need help to change from windows perl to linux perl by monarch
in thread Need help to change from windows perl to linux perl by muthuvel_perl

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.