in reply to Re: uninitialized value in modulus (%)
in thread uninitialized value in modulus (%)

thanks for the help, i will have to digest this for a while! I dont think $s can be empty, as the hash is automatic i think, there are no invalid records in flatfile, i will check... i may have things confused. if so i apologise! danke
  • Comment on Re: Re: uninitialized value in modulus (%)

Replies are listed 'Best First'.
Re: Re: Re: uninitialized value in modulus (%)
by alexiskb (Acolyte) on Aug 21, 2002 at 07:43 UTC
    Thanks very much, you were all quite right, the first iteration found no value ( uninitialised! doh! ) so i made it increment from 0 before i did stuff on it.. now it works fine... thanks perl monks!
    $alphabet{$s}++; open (DATA, ">> ./ATOZ/$s.shtml" )or die "can't open file: $s!"; if (($alphabet{$s}) % 2){ print DATA qq|<tr bgcolor="#eeeeee">; } else { print DATA qq|<tr bgcolor="#FFFFFF">|; } close DATA;