Re: The old \015 problem
Thanks to everyone for suggestions. Yes, DOS ftp stinks. Maybe the GUI version is better, I didn't try. Instead, I used a translate command to eliminate \015 throughout the file. dave. ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: The old \015 problem
On 10/7/2004 6:05 PM, David D Miller wrote: Where do I find this wonderful little tool? I looked for it on DOS and Unix without any luck. Not part of the perl delivery I guess. Just use perl: perl -lpe 'tr/\015//d' > newfile.pl or tr tr -d \015 < oldfile > newfile ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: The old \015 problem
Dave, dos2unix isn't part of the Perl distribution. My version of dos2unix (installed on solaris) lives in /bin. If for some reason you don't have an installed version of dos2unix try this web page to do your conversion: http://www.iconv.com/dos2unix.htm Cheers, Carter. > -Original Message- > From: David D Miller [mailto:[EMAIL PROTECTED] > Sent: Thursday, October 07, 2004 3:06 PM > To: Carter Thompson > Cc: [EMAIL PROTECTED] > Subject: RE: The old \015 problem > > > > > > > Carter: > > Where do I find this wonderful little tool? I looked for it > on DOS and Unix without any luck. Not part of the perl > delivery I guess. > > dave. > > > > > A really easy way is to use "dos2unix". It'll take care of the CRs. > > Carter. > > > > > -Original Message- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] > On Behalf > > Of David D Miller > > Sent: Thursday, October 07, 2004 2:35 PM > > To: [EMAIL PROTECTED] > > Subject: The old \015 problem > > > > > > > > > > > > > > Folks > > > > I just copied (using ftp in binary mode) my perl scripts > from DOS to > > Unix and got caught on the carriage return problem: When I try to > > execute the DOS scipt in Unix, I get the following > > > > [mdscom]/usr/people/dmiller/WWW/cgi> perl wtdl.pl -w > > Illegal character \015 (carriage return) at wtdl.pl line 5. > (Maybe you > > didn't strip carriage returns after a network transfer?) > > > > Good message. Right on target. The question is, how do I remove > > those pesky CRs? > > > > dave. > > > > ___ > > Perl-Win32-Users mailing list > > [EMAIL PROTECTED] > > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > > > > > > ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: The old \015 problem
David D Miller wrote: > Folks > > I just copied (using ftp in binary mode) my perl scripts from DOS to Unix > and got caught on the carriage return problem: When I try to execute the > DOS scipt in Unix, I get the following > > [mdscom]/usr/people/dmiller/WWW/cgi> perl wtdl.pl -w > Illegal character \015 (carriage return) at wtdl.pl line 5. > (Maybe you didn't strip carriage returns after a network transfer?) > > Good message. Right on target. The question is, how do I remove those > pesky CRs? Since you don't seem to have gotten an answer that solves the original issue, just type the command 'ascii' before the 'put' command and you should be fine. Revert back to 'binary' for images and nonpure-text files. binary mode preserves the CRs, but ascii textmode will drop the CRs for you. -- ,-/- __ _ _ $Bill LuebkertMailto:[EMAIL PROTECTED] (_/ / )// // DBE CollectiblesMailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.com/ -/-' /___/_<_http://dbecoll.tripod.com/ (My Perl/Lakers stuff) ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: The old \015 problem
Did you specify ASCII mode; it may default to binary. Also, are you using a GUI (such as CuteFTP), or a character-based (Go to command line and type "ftp"). If you are doing the former, check the configurations. I would suggest a GUI. If you are doing it at a command prompt, you can often toggle binary mode by typing "b", "bin" or "binary" or "a" or "ascii". Get a verbose response as to what mode you are in before doing your put. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David D Miller Sent: Thursday, October 07, 2004 5:04 PM To: Dennis G. Wicks Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: The old \015 problem Dennis Tried that. I did a ftp> put on DOS side. Got a nastygram and ftp hung. That's why I did binary mode. dave. The easiest way is don't use binary mode. The ftp software is smart enough to handle it. Good Luck! Dennis On Thu, 7 Oct 2004, David D Miller wrote: > Date: Thu, 7 Oct 2004 14:34:48 -0700 > From: David D Miller <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: The old \015 problem > > > > > > Folks > > I just copied (using ftp in binary mode) my perl scripts from DOS to Unix > and got caught on the carriage return problem: When I try to execute the > DOS scipt in Unix, I get the following > > [mdscom]/usr/people/dmiller/WWW/cgi> perl wtdl.pl -w > Illegal character \015 (carriage return) at wtdl.pl line 5. > (Maybe you didn't strip carriage returns after a network transfer?) > > Good message. Right on target. The question is, how do I remove those > pesky CRs? > > dave. > > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: The old \015 problem
Carter: Where do I find this wonderful little tool? I looked for it on DOS and Unix without any luck. Not part of the perl delivery I guess. dave. A really easy way is to use "dos2unix". It'll take care of the CRs. Carter. > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of David D Miller > Sent: Thursday, October 07, 2004 2:35 PM > To: [EMAIL PROTECTED] > Subject: The old \015 problem > > > > > > > Folks > > I just copied (using ftp in binary mode) my perl scripts from > DOS to Unix and got caught on the carriage return problem: > When I try to execute the DOS scipt in Unix, I get the following > > [mdscom]/usr/people/dmiller/WWW/cgi> perl wtdl.pl -w > Illegal character \015 (carriage return) at wtdl.pl line 5. > (Maybe you didn't strip carriage returns after a network transfer?) > > Good message. Right on target. The question is, how do I > remove those pesky CRs? > > dave. > > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: The old \015 problem
Folks I just copied (using ftp in binary mode) my perl scripts from DOS to Unix and got caught on the carriage return problem: When I try to execute the DOS scipt in Unix, I get the following [mdscom]/usr/people/dmiller/WWW/cgi> perl wtdl.pl -w Illegal character \015 (carriage return) at wtdl.pl line 5. (Maybe you didn't strip carriage returns after a network transfer?) Good message. Right on target. The question is, how do I remove those pesky CRs? dave. - When you transfer files in binary mode, line endings are not converted. If your transfer a perl script from unix to unix in binary mode it will work (because both OS's use the same line endings). When transferring from unix to windows use ASCII mode (converts line endings from unix to windows). Regards, Chris ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: The old \015 problem
Dennis Tried that. I did a ftp> put on DOS side. Got a nastygram and ftp hung. That's why I did binary mode. dave. The easiest way is don't use binary mode. The ftp software is smart enough to handle it. Good Luck! Dennis On Thu, 7 Oct 2004, David D Miller wrote: > Date: Thu, 7 Oct 2004 14:34:48 -0700 > From: David D Miller <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: The old \015 problem > > > > > > Folks > > I just copied (using ftp in binary mode) my perl scripts from DOS to Unix > and got caught on the carriage return problem: When I try to execute the > DOS scipt in Unix, I get the following > > [mdscom]/usr/people/dmiller/WWW/cgi> perl wtdl.pl -w > Illegal character \015 (carriage return) at wtdl.pl line 5. > (Maybe you didn't strip carriage returns after a network transfer?) > > Good message. Right on target. The question is, how do I remove those > pesky CRs? > > dave. > > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: The old \015 problem
Title: RE: The old \015 problem David D Miller [ddmiller AT raytheon DOT com] wrote: >I just copied (using ftp in binary mode) my perl scripts from DOS >to Unix and got caught on the carriage return problem: When I >try to executethe DOS scipt in Unix, I get the following > >[mdscom]/usr/people/dmiller/WWW/cgi> perl wtdl.pl -w >Illegal character \015 (carriage return) at wtdl.pl line 5. >(Maybe you didn't strip carriage returns after a network transfer?) > >Good message. Right on target. The question is, how do I remove >those pesky CRs? Easiest: use the "dos2unix" executable (available on Linux and most Unix) Pure Perl (run under Linux/Unix): perl -pe 's/\r$//' filename > filename.stripped -- Mike Arms ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: The old \015 problem
The easiest way is don't use binary mode. The ftp software is smart enough to handle it. Good Luck! Dennis On Thu, 7 Oct 2004, David D Miller wrote: > Date: Thu, 7 Oct 2004 14:34:48 -0700 > From: David D Miller <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: The old \015 problem > > > > > > Folks > > I just copied (using ftp in binary mode) my perl scripts from DOS to Unix > and got caught on the carriage return problem: When I try to execute the > DOS scipt in Unix, I get the following > > [mdscom]/usr/people/dmiller/WWW/cgi> perl wtdl.pl -w > Illegal character \015 (carriage return) at wtdl.pl line 5. > (Maybe you didn't strip carriage returns after a network transfer?) > > Good message. Right on target. The question is, how do I remove those > pesky CRs? > > dave. > > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: The old \015 problem
A really easy way is to use "dos2unix". It'll take care of the CRs. Carter. > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of David D Miller > Sent: Thursday, October 07, 2004 2:35 PM > To: [EMAIL PROTECTED] > Subject: The old \015 problem > > > > > > > Folks > > I just copied (using ftp in binary mode) my perl scripts from > DOS to Unix and got caught on the carriage return problem: > When I try to execute the DOS scipt in Unix, I get the following > > [mdscom]/usr/people/dmiller/WWW/cgi> perl wtdl.pl -w > Illegal character \015 (carriage return) at wtdl.pl line 5. > (Maybe you didn't strip carriage returns after a network transfer?) > > Good message. Right on target. The question is, how do I > remove those pesky CRs? > > dave. > > ___ > Perl-Win32-Users mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs