#!/usr/local/bin/perl open (INPUT, "< /etc/passwd"); while() { ($col1, undef, undef, undef, $col5, undef) = split(/:/, $_); #undef are blank fields here write(); } format STDOUT_TOP = Name ID ---- -- . format STDOUT = @<<<<<<<<<<<<<< @<<<<<<<<<<<<<<< $col1, $col5 .