The undef is so that CF & F have the same values in the same location.
Here's a perl one liner to process permissions.dat.
perl -anF -e 'chown ($F, $F, $F); chmod (oct($F), $F);'
If you're in to more error checking setperms.sh is more elaborate but
I didn't see that until after writing this. setperms.sh ignores field
5 which is called special (reserved for future use or something...)