Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Maybe your scripts (firstscript and secondscript) have <CR><LF> line terminations instead of the usual (on unix) <LF> line termination. That might explain the first of your error messages. The second error message, beginning without an opening single quote and with the text ".links" is a bit more puzzling.

One way to see what your line terminations are is to use the "od" command. For example, in the following, each line ends with "\r\n".

$ od -c test.html 0000000 < h t m l > \r \n < h e a d > \r \ +n 0000020 < t i t l e > t e s t < / t i +t 0000040 l e > \r \n < / h e a d > \r \n < +b 0000060 o d y > \r \n T h i s i s s +o 0000100 m e " t e x t " i n t h +e 0000120 b o d y . \r \n < / b o d y > \ +r 0000140 \n < / h t m l > \r \n 0000152

After converting the line endings, it appears as follows:

$ od -c test.html 0000000 < h t m l > \n < h e a d > \n < +t 0000020 i t l e > t e s t < / t i t l +e 0000040 > \n < / h e a d > \n < b o d y +> 0000060 \n T h i s i s s o m e " +t 0000100 e x t " i n t h e b o d +y 0000120 . \n < / b o d y > \n < / h t m +l 0000140 > \n 0000142

Now the lines end with "\n" only.

Depending on your unix installation, you may have a command "dos2unix". I used the vim editor. You might also be able to use the "tr" command as "tr -d '\r' <file.old >file.new"

How did you create your perl script files?


In reply to Re: perl callable from bash? by ig
in thread perl callable from bash? by hsmyers

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 sharing their wisdom with the Monastery: (3)
As of 2024-04-23 22:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found