Home: Perl Programming Help: Advanced:
5.8.3 vs. 5.8



griswald88
Novice

Feb 24, 2004, 2:31 PM


Views: 6225
5.8.3 vs. 5.8

I have scripts that write to data files and then download them to a client machine; all was working perfectly until users upgraded to Perl version 5.8.3. Now it appears that every record of data that is downloaded has an extra LINE FEED character chr(10) on appended to the end. This causes issues because I return the size of the file using -s and then on the client side I perform a FileLen operation that returns the file in size (excluding these extra line feeds). How has Perl's syntax changed? Is the \n for newline behaving differently? Please HELP as this is extremely urgent! Thanks!!!


davorg
Thaumaturge / Moderator

Feb 25, 2004, 12:53 AM


Views: 6224
Re: [griswald88] 5.8.3 vs. 5.8

I can't think offhand of any changes that might have caused the problems that you are seeing, but you minght like to take a look at the perldelta manual pages for 5.8.0, 5.8.1, 5.8.2 and 5.8.3 for more details of the changes in those versions.

--
Dave Cross, Perl Hacker, Trainer and Writer
http://www.dave.org.uk/
Get more help at Perl Monks


griswald88
Novice

Feb 25, 2004, 7:29 AM


Views: 6222
Re: [davorg] 5.8.3 vs. 5.8

It appears as though on SOME servers, after printing data to a file with "\n" at the end, once I download the file there are ONLY line feeds delimiting the records whereas on the server it appears to be carraiage return + line feeds....any ideas here? This is very frustrating as on the server I perform a -s on the file, then return the result of this (file size) to the client. The client then, after the download, performs a file size check as well to ensure that the whole file was successfully downloaded, but its value is off by 1 character PER record (missing carriage return).


davorg
Thaumaturge / Moderator

Feb 25, 2004, 7:36 AM


Views: 6221
Re: [griswald88] 5.8.3 vs. 5.8

Sounds like the difference between the Unix line end character and the Windows one (which is, in fact, two characters).

My article might explain a little better.

--
Dave Cross, Perl Hacker, Trainer and Writer
http://www.dave.org.uk/
Get more help at Perl Monks


griswald88
Novice

Feb 25, 2004, 9:20 AM


Views: 6220
Re: [davorg] 5.8.3 vs. 5.8

Thats a nice article. Here is some more information that I have that may help. When the data is written to the file on the server, which is the local systems windows web server, it looks fine in notepad, BUT when I download the file, FROM THE SAME SYSTEM, it seems to strip away the CR character...any more ideas? The transfer is taking place on the same machine...