Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

upload cgi in binary workaround

by mandog (Curate)
on Jul 27, 2002 at 01:45 UTC ( [id://185709]=perlquestion: print w/replies, xml ) Need Help??

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://185709]
Approved by dws
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-25 17:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found