Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Hmm, my first reaction was that it seems to me that Perl is able to deal with DOS end-of-lines (^M) under *nix without any problem within the script itself (and I think the other way around too). Not that I have ascertained it by making a decisive test on it, but after having developed programs under Windows and run them under Unix for so many years, it is almost doubtless that I would have encountered the problem if Perl wasn't able to deal with that, and I am almost sure I have never met it.

Having said that, other non-printing characters is definitely a possibility, I ran into this type of problem just a couple of days ago under VMS: for some reason, my Windows editor added some presumably utf-8 character at the very beginning of my program, which refused to even compile.

And, thinking back to my initial reaction in my first sentence above, it is absolutely true that if the shebang line is faulty, well, it is not interpreted by Perl but by the shell. And the shell is not as clever as Perl. But then, maybe I should have met the problem with DOS formated Perl script? Well, probably not, because I actually almost never really use the shebang line, my Unix shell scripts running Perl programs almost always launch the Perl program with a command such as perl my_script.pl (this way I don't run into RWE problems if I forgot to change privileges). And the same when I run a Perl program directly from the shell prompt. So that, in the end, your hypothesis might very well be right.

Well, all this to say that I initially thought you were probably wrong, and that, after a second thought, I think you might be right.

Je suis Charlie.

In reply to Re^2: Perl program does not seem to be understood by Fedora 21 by Laurent_R
in thread Perl program does not seem to be understood by Fedora 21 by swampyankee

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (9)
As of 2024-03-28 11:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found