in reply to Why do I need -w in a cgi script
In that case, all the lines will have a trailing ^M (before the newline). Without the -w, you're telling the kernel you want to execute "/usr/bin/perl^M". That's a perfectly valid filename under Unix, but it's unlikely such a program exists.
With the -w, the line ends with "-w^M", and perl itself can deal with the Windows ending.
The solution is to strip the ^M's out of your file. FTP ASCII upload will do this automatically for you. Or use a utility like dos2unix, or something like:
on the Unix side.perl -wple 's/^M//' yourfile
Abigail
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Why do I need -w in a cgi script
by liz (Monsignor) on Oct 09, 2003 at 18:25 UTC | |
by ambrus (Abbot) on Oct 10, 2003 at 10:59 UTC | |
by ambrus (Abbot) on Oct 17, 2003 at 11:56 UTC | |
|
Re: Re: Why do I need -w in a cgi script
by etcshadow (Priest) on Oct 09, 2003 at 15:41 UTC | |
|
Re: Re: Why do I need -w in a cgi script
by kryberg (Pilgrim) on Oct 09, 2003 at 15:51 UTC | |
by jonadab (Parson) on Oct 09, 2003 at 16:06 UTC | |
|
Re: Re: Why do I need -w in a cgi script
by Juerd (Abbot) on Oct 09, 2003 at 16:18 UTC | |
by Abigail-II (Bishop) on Oct 09, 2003 at 16:25 UTC |