I found this piece of code useful to generate an unpack format when I needed to translate a columnar text file. $fmt = ""; while(<>) {chomp; $fmt |= $_}; $fmt =~ y/ /X/c; $fmt =~ s/(X+\s+)/"A".(length($1)-1)."x"/ge; <chaim> -- Chaim Frenkel Nonlinear Knowledge, Inc. chaimf@pobox.com +1-718-236-0183 ==== Want to unsubscribe from Fun With Perl? ==== Well, if you insist... Send mail with body "unsubscribe" to ==== fwp-request@technofile.org