<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1021446" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1021446</link>
    <description></description>
    <language>en</language>
          <item>
    <title>Hi all,
I am trying to learn</title>
    <link>https://www.webmaster-forums.net/serverside-scripting/perl-code-download-csv-file#comment-1284984</link>
    <description> &lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;I am trying to learn perl scripting.Can some one suggest me the best way to start up.Please keep in mind that i dont even know the basics&lt;/p&gt;
 </description>
     <pubDate>Thu, 30 May 2013 07:59:39 +0000</pubDate>
 <dc:creator>whoami</dc:creator>
 <guid isPermaLink="false">comment 1284984 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/perl-code-download-csv-file#comment-1132795</link>
    <description> &lt;p&gt;I&#039;m surprised it worked.  hehe... Perl is not my forte.  I just dable a bit here and there.&lt;/p&gt;
&lt;p&gt;Believe it or not, I learn a heck of a lot researching for answers to people&#039;s questions.  I&#039;m looking forward to providing assistance in the future. &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Tue, 10 Jun 2003 05:45:52 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1132795 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/perl-code-download-csv-file#comment-1132784</link>
    <description> &lt;p&gt;It worked!&lt;/p&gt;
&lt;p&gt;Mark, thank you for the continued feedback and ideas, and seeing this through to the end.&lt;/p&gt;
&lt;p&gt;And be on the look-out for my upcoming thread about file uploads! &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt; :-) &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Tue, 10 Jun 2003 00:35:46 +0000</pubDate>
 <dc:creator>critical</dc:creator>
 <guid isPermaLink="false">comment 1132784 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/perl-code-download-csv-file#comment-1132725</link>
    <description> &lt;p&gt;Try chomping the line.&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;open(LOG, &amp;quot;anything.txt&amp;quot;);&lt;br /&gt;while(&amp;lt;LOG&amp;gt;) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; chomp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print $_, &amp;quot;\r\n&amp;quot;;&lt;br /&gt;}&lt;br /&gt;close(LOG);&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
 </description>
     <pubDate>Sun, 08 Jun 2003 22:03:57 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1132725 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/perl-code-download-csv-file#comment-1132677</link>
    <description> &lt;p&gt;Thanks Mark - that&#039;s very interesting.  Here&#039;s what I found out:&lt;/p&gt;
&lt;p&gt;open(LOG, &quot;anything.txt&quot;);&lt;br /&gt;
my @file_array = ;&lt;br /&gt;
close(LOG);&lt;/p&gt;
&lt;p&gt;print &quot;Content-disposition: attachment; filename=anything.txt\n\n&quot;;&lt;/p&gt;
&lt;p&gt;# opens in Wordpad - but no line returns in Notepad&lt;br /&gt;
print @file_array; &lt;/p&gt;
&lt;p&gt;-OR-&lt;/p&gt;
&lt;p&gt;# opens in Notepad - extra line returns after each line in Wordpad&lt;br /&gt;
foreach my $dline (@file_array) {&lt;br /&gt;
print &quot;$dline\r\n&quot;;&lt;br /&gt;
} # end for&lt;/p&gt;
&lt;p&gt;So how the heck can I get the text file to open in *both* Notepad and Wordpad with the proper number of line returns???  Bizarre problem...&lt;/p&gt;
 </description>
     <pubDate>Sat, 07 Jun 2003 17:41:10 +0000</pubDate>
 <dc:creator>critical</dc:creator>
 <guid isPermaLink="false">comment 1132677 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/perl-code-download-csv-file#comment-1132676</link>
    <description> &lt;p&gt;see next post...&lt;/p&gt;
 </description>
     <pubDate>Sat, 07 Jun 2003 17:39:58 +0000</pubDate>
 <dc:creator>critical</dc:creator>
 <guid isPermaLink="false">comment 1132676 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/perl-code-download-csv-file#comment-1132620</link>
    <description> &lt;p&gt;This isn&#039;t really a bug.  More of a compatability issue.&lt;/p&gt;
&lt;p&gt;The line seperator for different operatings systems is as follows:&lt;br /&gt;
win: \r\n&lt;br /&gt;
nix: \n&lt;br /&gt;
mac: \r&lt;/p&gt;
&lt;p&gt;When you upload a .txt file via FTP in ASCII mode, it automatically makes the conversion for you (changing the line delimiter).  But when you simply send the file as is, the conversion isn&#039;t being made.&lt;/p&gt;
&lt;p&gt;Solution, upload your .txt files in binary mode.  This will prevent the line delimiters from being converted between systems.  However, this may cause other problems.  (read errors on the unix machine)&lt;/p&gt;
 </description>
     <pubDate>Fri, 06 Jun 2003 16:45:47 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1132620 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/perl-code-download-csv-file#comment-1132617</link>
    <description> &lt;p&gt;Well, it&#039;s been over a week... and my file download script is working great!&lt;/p&gt;
&lt;p&gt;One quirk though:&lt;/p&gt;
&lt;p&gt;If you download a plain text file - anything.txt - and open it in Notepad, the line returns are gone!!!  All the lines of the original file just wrap around as one long line now!&lt;/p&gt;
&lt;p&gt;If you open the downloaded text file in Wordpad or Excel, this does not happen - it displays properly.&lt;/p&gt;
&lt;p&gt;Doesn&#039;t matter how you do the download, either:&lt;/p&gt;
&lt;p&gt;print &quot;Content-disposition: attachment; filename=anything.txt\n\n&quot;;&lt;br /&gt;
open(LOG, &quot;anything.txt&quot;);&lt;br /&gt;
my @file_array = ;&lt;br /&gt;
close(LOG);&lt;/p&gt;
&lt;p&gt;print @file_array;&lt;/p&gt;
&lt;p&gt;_OR_&lt;/p&gt;
&lt;p&gt;foreach my $dline (@file_array) {&lt;br /&gt;
print $dline;&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;Either of the above work the same way.  Printing extra line returns (\n) doesn&#039;t help either.&lt;/p&gt;
&lt;p&gt;I&#039;ve seen this before.  There&#039;s a bug in the Webmin application for Linux servers for example.  When you use Webmin&#039;s file manager to edit a server&#039;s httpd directives, it saves the changes as one long line of text which is a serious problem.&lt;/p&gt;
&lt;p&gt;Anybody know more about this?  Why does it happen?  How to keep it from happening?  Is there any way to download a text file from a server (from a web page) so that the integrity of each line is maintained in both Notepad *and* Wordpad?  Why is there a discrepancy in the way these two text editors included on every Windows PC interpret line-returns in a downloaded text file?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
 </description>
     <pubDate>Fri, 06 Jun 2003 14:46:54 +0000</pubDate>
 <dc:creator>critical</dc:creator>
 <guid isPermaLink="false">comment 1132617 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/perl-code-download-csv-file#comment-1132213</link>
    <description> &lt;p&gt;Also: &lt;a href=&quot;http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q260/5/19.ASP&amp;amp;NoWebContent=1&quot; class=&quot;bb-url&quot;&gt;http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q260/5/19.ASP&amp;amp;NoWebContent=1&lt;/a&gt;&lt;/p&gt;
 </description>
     <pubDate>Wed, 28 May 2003 13:43:04 +0000</pubDate>
 <dc:creator>critical</dc:creator>
 <guid isPermaLink="false">comment 1132213 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/perl-code-download-csv-file#comment-1132199</link>
    <description> &lt;p&gt;Ah, found it...&lt;/p&gt;
&lt;p&gt;Quotes from here: &lt;a href=&quot;ftp://ftp.rfc-editor.org/in-notes/rfc2616.txt&quot; class=&quot;bb-url&quot;&gt;ftp://ftp.rfc-editor.org/in-notes/rfc2616.txt&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;15.5 Content-Disposition Issues&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; RFC 1806 [35], from which the often implemented Content-Disposition&lt;br /&gt;&amp;nbsp;&amp;nbsp; (see section 19.5.1) header in HTTP is derived, has a number of very&lt;br /&gt;&amp;nbsp;&amp;nbsp; serious security considerations. Content-Disposition is not part of&lt;br /&gt;&amp;nbsp;&amp;nbsp; the HTTP standard, but since it is widely implemented, we are&lt;br /&gt;&amp;nbsp;&amp;nbsp; documenting its use and risks for implementors. See RFC 2183 [49]&lt;br /&gt;&amp;nbsp;&amp;nbsp; (which updates RFC 1806) for details.&lt;/code&gt;&lt;/div&gt;&#039;&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;19.5.1 Content-Disposition&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; The Content-Disposition response-header field has been proposed as a&lt;br /&gt;&amp;nbsp;&amp;nbsp; means for the origin server to suggest a default filename if the user&lt;br /&gt;&amp;nbsp;&amp;nbsp; requests that the content is saved to a file. This usage is derived&lt;br /&gt;&amp;nbsp;&amp;nbsp; from the definition of Content-Disposition in RFC 1806 [35].&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; content-disposition = &amp;quot;Content-Disposition&amp;quot; &amp;quot;:&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; disposition-type *( &amp;quot;;&amp;quot; disposition-parm )&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; disposition-type = &amp;quot;attachment&amp;quot; | disp-extension-token&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; disposition-parm = filename-parm | disp-extension-parm&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; filename-parm = &amp;quot;filename&amp;quot; &amp;quot;=&amp;quot; quoted-string&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; disp-extension-token = token&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; disp-extension-parm = token &amp;quot;=&amp;quot; ( token | quoted-string )&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; An example is&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Content-Disposition: attachment; filename=&amp;quot;fname.ext&amp;quot;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; The receiving user agent SHOULD NOT respect any directory path&lt;br /&gt;&amp;nbsp;&amp;nbsp; information present in the filename-parm parameter, which is the only&lt;br /&gt;&amp;nbsp;&amp;nbsp; parameter believed to apply to HTTP implementations at this time. The&lt;br /&gt;&amp;nbsp;&amp;nbsp; filename SHOULD be treated as a terminal component only.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; If this header is used in a response with the application/octet-&lt;br /&gt;&amp;nbsp;&amp;nbsp; stream content-type, the implied suggestion is that the user agent&lt;br /&gt;&amp;nbsp;&amp;nbsp; should not display the response, but directly enter a `save response&lt;br /&gt;&amp;nbsp;&amp;nbsp; as...&amp;#039; dialog.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; See section 15.5 for Content-Disposition security issues.&lt;/code&gt;&lt;/div&gt;&#039;&lt;br /&gt;
(haha... one of the two writers of RFC 1806 lives in my city)&lt;/p&gt;
 </description>
     <pubDate>Wed, 28 May 2003 06:50:31 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1132199 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
