#! perl -slw use strict; open FH_INPUT, " ) { chomp; m{ESME_RTHROTTLED} and (m{^\s+([0-9/\.\:\-]+)\n} and print "THROTTLING DETECTED: $1"); }