in reply to decode a file

In fact I am trying to use it, but things aren't working as expected. I needd to find out if i could decode the whole file at one time, by simple decoding $record, if that's the case then I'll keep searching for the problem.
Thanks