in reply to Pulling out pairs
Assuming you're passing filenames on the command line, try
while ( <> ) { next if ! /:/; ... } [download]