{ local $/ = ""; # Paragraph mode RECORD: while (my $record = ) { my @lines = split "\n", $record ; $TI = undef; $RT = undef; for my $line (@lines) { $TI = "$1" if $line =~ /^TITLE=(.*)/; $RT = "$1" if $line =~ /^RTINSECONDS=(.*)/; next RECORD if defined $TI and defined $RT; # skip to next record } } }