Are you using warnings and strict? The code fragment you posted shows  use warnings; but the following suggests it's not used | there or has been disabled:

c:\@Work\Perl\monks>perl -wMstrict -le "my $index; $index == 0; ;; my @ra = qw(foo bar); print $ra[$index]; " Useless use of numeric eq (==) in void context at -e line 1. Use of uninitialized value $index in numeric eq (==) at -e line 1. Use of uninitialized value $index in array element at -e line 1. foo

use warnings; and  use strict; may help you find many instances of questionable code.

Another question comes to mind about the 'download' method you are using. If a text file is downloaded via a channel that automatically corrects line endings (e.g., cr-lf versus lf), the file will visually appear unchanged, but a binary file may be (almost certainly will be if it's big enough) corrupted. If you're using FTP, are you using ascii or binary mode?


In reply to Re: CRC Error on ZIP Files by AnomalousMonk
in thread CRC Error on ZIP Files by SearchigPerl

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.