Matt Schneider wrote:
Pankaj,
You say that when you develop them on the UNIX machine they run fine but
when you developed them on a Windows machine and save them to the UNIX
machine they don't run. The problem might be the difference between
Windows and UNIX new line characters. If you open a file developed on
Windows in vi on the UNIX machine and it says [dos] at the bottom that
might cause this problem.
I'm not sure if there is an easier way to fix it than this but what I
have done in the past is to open the script and read each line
performing a chop twice to remove the two "invisible" characters that
make up the DOS new line and then write it to a new file with a "\n" on
the end.
This can usually be remedied if you upload the file to the UNIX server using
ASCII mode of FTP which will remove the \r's from the file.
vim is quite capable of working with UNIX line endings on Win32. I have
set fileformats=unix,dos
in my .vimrc file which allows me to create all of my Win32 files with
UNIX line endings. Make sure if you create a .bat file that you switch
to dos line endings (:set fileformat=dos).
--
,-/- __ _ _ $Bill Luebkert ICQ=162126130
(_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED]
/ ) /--< o // // http://dbecoll.tripod.com/ (Free site for Perl)
-/-' /___/_<_</_</_ Castle of Medieval Myth & Magic http://www.todbe.com/
_______________________________________________
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs