in reply to Perl Script only runs with -w switch
And we'll go nuts trying to read your mind. Give us more info. Try working up a small example that demonstrates the problem, and post the code. To get small, take a script that's failing, and remove as much as you can.
Here's a wild guess: You FTP'd the scripts from your FreeBSD system to a Win32 box, then FTP'd them to the RedHat server. Along the way, the scripts picked up Win32 line endings (\r\n), which you neglected to removed as you moved the files to RedHat (i.e., by transfering in binary mode). This would leave you with shebang lines that either look like: #!/usr/bin/perl -w\r which works, or #!/usr/bin/perl\r which doesn't, because the OS is unable to locate an executable named "/usr/bin/perl\r".
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Perl Script only runs with -w switch
by NailBombJoe (Novice) on Nov 21, 2002 at 20:16 UTC | |
by Nitrox (Chaplain) on Nov 21, 2002 at 20:22 UTC | |
by NailBombJoe (Novice) on Nov 21, 2002 at 20:38 UTC |