in reply to looping through a csv file

Just a small side note. If you insist on using the split function to process your CSV file despite the previous advice, or if you have to use it in a different context, rather than:
($number, $addr1, $addr2, $addr3, $addr4) = (split /,/)[0,1,2,3,4];
you can simply write:
my ($number, $addr1, $addr2, $addr3, $addr4) = split /,/;