Perl and CR+LF 
Author Message
 Perl and CR+LF

Hi!

This is an obsolete problem in the 20th century, but it still exists. I
have users who write perl-cgi-scripts on Win95-Clients and transfer them
by samba to a linux host, where they should be executed. But the perl
version on linux doesn't want to deal with the line endings (CR+LF). Is
there, despite of conversing the scripts, a perl parameter to tell it to
take a different lineending? Otherwise I have to use a wrapper, which is
not a nice solution.

MfG/Sincerely
                Joachim von Thadden

________________________________________________________________________
Berlin-Brandenburg Academy of Sciences          Joachim von Thadden
Jaegerstrasse 22-23                             System Administration

http://www.*-*-*.com/                               phone +49 +30 203 70 375



Sat, 23 Jun 2001 03:00:00 GMT  
 Perl and CR+LF

Quote:
> This is an obsolete problem in the 20th century, but it still exists. I
> have users who write perl-cgi-scripts on Win95-Clients and transfer them
> by samba to a linux host, where they should be executed. But the perl
> version on linux doesn't want to deal with the line endings (CR+LF).

transfer them is ascii mode (or is that a samba problem?) or use
something like dos2unix to strip the extra characters.

good luck :)

--
brian d foy                    
CGI Meta FAQ <URL:http://www.smithrenaud.com/public/CGI_MetaFAQ.html>



Sat, 23 Jun 2001 03:00:00 GMT  
 Perl and CR+LF
Hi Joachim

$/ = "\r\n";

Quote:
> there, despite of conversing the scripts, a perl parameter to tell it to
> take a different lineending? Otherwise I have to use a wrapper, which is
> not a nice solution.

Per.

--
Per Kistler
Digital Wire Consulting

-----------------------------------------------------------------------



Sat, 23 Jun 2001 03:00:00 GMT  
 Perl and CR+LF


Quote:

>> This is an obsolete problem in the 20th century, but it still exists. I
>> have users who write perl-cgi-scripts on Win95-Clients and transfer them
>> by samba to a linux host, where they should be executed. But the perl
>> version on linux doesn't want to deal with the line endings (CR+LF).

> transfer them is ascii mode (or is that a samba problem?) or use

I wouldn't call it a problem :), but:

It is, at least from my last experience with samba. It doesn't, and in
my opinion shouldn't, translate end-of-line markers.

Quote:
> something like dos2unix to strip the extra characters.

Or educate your users about this, and make them use an editor that can
save files with a unix line ending. vim will do it, so will PFE, and a
variety of other decent editors will do it as well.

Martien
--
Martien Verbruggen                  |
Webmaster www.tradingpost.com.au    | 75% of the people make up 3/4 of the
Commercial Dynamics Pty. Ltd.       | population.
NSW, Australia                      |



Sun, 24 Jun 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. NT Perl and CR/LF

2. DOS Perl convering LF to CR/LF

3. Converting LF to CR+LF

4. Question about formatting/(CR/LF) in PERL

5. Cr Lf and Perl for Win NT

6. $/ = CR LF?

7. <FILE> and CR-LF

8. Binary data and CR-LF's in MSDOS

9. CR before login or any help that would lf before login

10. CR/LF

11. how to remove cr/lf ???

12. Any Utility in Win32/Win95/Dos to remove CR or LF

 

 
Powered by phpBB® Forum Software