I want to read through a file and the read through it again. However the only way it seems to work for me is if I open the file, Read the file, Close the file, and the reopen it. Is there a way to do this with out having to run the open command twice?
Does not work -------------- open PEL, "vend.csv"; my (%dup,%vend); foreach (<PEL>){ chomp; @temp=split /,/,$_; $_=~s/ //g foreach (@temp); $dup{$temp[1]}++; } foreach (<PEL>){ chomp; @temp=split /,/,$_; print "$_\n" foreach (@temp); $_=~s/ //g foreach (@temp); $vend{$temp[1]}=$temp[0]; } Does Work --------- open PEL, "vend.csv"; my (%dup,%vend); foreach (<PEL>){ chomp; @temp=split /,/,$_; $_=~s/ //g foreach (@temp); $dup{$temp[1]}++; } open PEL,"vend.csv"; foreach (<PEL>){ chomp; @temp=split /,/,$_; $_=~s/ //g foreach (@temp); $vend{$temp[1]}=$temp[0]; } Paul Kraus Network Administrator PEL Supply Company 216.267.5775 Voice 216-267-6176 Fax www.pelsupply.com
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]