$ perl -e ' my $fmt = "%7s %7s %7s\n"; my $x = "JO EMS Math"; my $y = "Jon EMS Physics"; printf $fmt, split " ", $_ for $x, $y; ' JO EMS Math Jon EMS Physics