CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

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

 



griswald88
Novice

Feb 24, 2004, 2:31 PM

Post #1 of 5 (2766 views)
5.8.3 vs. 5.8 Can't Post

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

Post #2 of 5 (2765 views)
Re: [griswald88] 5.8.3 vs. 5.8 [In reply to] Can't Post

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

Post #3 of 5 (2763 views)
Re: [davorg] 5.8.3 vs. 5.8 [In reply to] Can't Post

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

Post #4 of 5 (2762 views)
Re: [griswald88] 5.8.3 vs. 5.8 [In reply to] Can't Post

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

Post #5 of 5 (2761 views)
Re: [davorg] 5.8.3 vs. 5.8 [In reply to] Can't Post

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...

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives