BEGIN { $/ = "\n"; $\ = "\n"; } LINE: while (defined($_ = )) { chomp $_; our(@F) = split(/:/, $_, 0); print $F[2]; }