#!/bin/perl while (<>) { chop; s/.*.*//; print "$_\n"; }