mandog has asked for the wisdom of the Perl Monks concerning the following question:

A common new user error is to ftp a perl script from a MSFT windows machine to a unix machine in binary mode. As near as I can tell UNIX perls do not like a shbang line like:

"#!/usr/bin/perl -wT\r\n"

However tacking a space onto the end of the shbang line llke this:

"#!/usr/bin/perl -wT \r\n"

...works just fine

Is there are reason not to distribute my scripts w/ a space at the end of the shbang?



email: mandog

Replies are listed 'Best First'.
Re: upload cgi in binary workaround
by DamnDirtyApe (Curate) on Jul 27, 2002 at 06:20 UTC

    Seems to work fine either way for me.

    As an aside, if you've got scripts that have been uploaded incorrectly, you can fix them like so:

    perl -p -i -e 's/\r\n/\n/' my_prog.pl

    _______________
    D a m n D i r t y A p e
    Home Node | Email
Re: upload cgi in binary workaround
by blakem (Monsignor) on Sep 22, 2002 at 22:00 UTC