in reply to special characters storage in perl

1. Both for() loops use $index, the second overwriting the first one. This means the outer loop won't. Use my $index to fix this.

2. Consider using

foreach my $record (@records) { # Do stuff with $record }
instead of
for(;$index<@records;$index++) { # Do stuff with $records[$index] }

-- Time flies when you don't know what you're doing