foreach ($first,$last) { s/^\s+//; s/\s+$//; }