Harry Putnam wrote:
A brief aside to John K:
Harry wrote:
Outputs a mess:
./myscript t1.jpg
,----
| sh: 1: Syntax error: Unterminated quoted string
| sh: 1: ������:+Y�0y�: not found
| sh: 1: �: not found
| sh: 1: Syntax error: EOF in backquote substitution
|
| [...]
`----
[...]
"John W. Krahn"<jwkr...@shaw.ca> responded:
The "sh" at the beginning of the error message means that the _shell_
is trying to run your program, not perl, and is reporting the error.
The _first_ line of your program _must_ be:
#!/usr/bin/perl
Thanks for your other good tips, this one is actually only misplaced
due to the fact that I did NOT include the `shebang' in my clipping.
The output shown however was obtained with the full perl shebang in
place. I tested it again just now.
It still indicates the shell trying to run the commands but there must
be some other reason than a missing `shebang'.
The whole thing (though thoroughly terrible) was:
------- 8< snip ---------- 8< snip ---------- 8<snip -------
#!/usr/local/bin/perl
use strict;
use warnings;
Could it be that your editor is putting a BOM as the first two
characters of your program?
John
--
Any intelligent fool can make things bigger and
more complex... It takes a touch of genius -
and a lot of courage to move in the opposite
direction. -- Albert Einstein
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/