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 \
0000020 < t i t l e > t e s t < / t i
0000040 l e > \r \n < / h e a d > \r \n <
0000060 o d y > \r \n T h i s i s s
0000100 m e " t e x t " i n t h
0000120 b o d y . \r \n < / b o d y > \
0000140 \n < / h t m l > \r \n
After converting the line endings, it appears as follows:
$ od -c test.html
0000000 < h t m l > \n < h e a d > \n <
0000020 i t l e > t e s t < / t i t l
0000040 > \n < / h e a d > \n < b o d y
0000060 \n T h i s i s s o m e "
0000100 e x t " i n t h e b o d
0000120 . \n < / b o d y > \n < / h t m
0000140 > \n
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?
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:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||