I think the Shebang thing, although valid, is a red herring.

I know next to nothing about Komodo except that it's an IDE. But: the error message clearly indicates that it comes from /bin/sh, although you say that you run it using Komodo. This means to me Komodo chose the shell, instead of Perl, for executing your script. Most IDEs use the file name extension for that desision. How did you name your script? Did you perhaps name it something like whatever.sh (which might trick Komodo into thinking it's a Shell script)? If it's not that, you need to look up how Komodo decides which Interpreter to use, and change that accordingly.

Another point is that the shell is looking for open.pl, which makes me think you either have some shell alias or function in place, or Komodo's macro facility is chiming in. Where did you store your script? Is it perhaps the path where Komodo stores its macros?

TL;DR: Store your script somewhere like /home/hchana/exercises/openandread.pl

In reply to Re: open and read text file by soonix
in thread open and read text file by hchana

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.