#!/opt/bin/perl -slw use strict; print "\nLast First Phone Bldg Room email\n"; open FH => " =~ m[ ([^,]+) , \s* (.+) $]x; printf '%7.7s %7.7s %7.7s ', =~ m[ ([^/]+) / (?:(\S+)\s+)? (\S+) $]x; printf "%s\n", =~ m[^(\S+)]; }