while( <> ) { chomp; if( tr/IMO//c ) { s/([^IMO]+)/[-->$1<--]/g; print "File: $ARGV, Line $.: $_\n"; } }