in reply to awk/perl?

You can do basically the same with perl
open (INPUT, "<$flatfile"); while(<INPUT>) { $_ =~ /[dlrwxsS-]{10}\s/\n/g; print; } close INPUT;
This snippet will substitute the (for example) "lrwxr-xr-x" part into a \n character. I took [dlrwxsS-] to match the possible characters. I might have forgotten one or two possibilities ;)
--
b10m