while ( my $line = ) { next unless $line =~ /\d{4,}\.\d{3}-\d{4,}\.\d{3}/; my( $bytes ) = $line =~ /\s(\d+)$/; if ( $bytes > $grenzwert ) { $data .= '1' } else { $data .= '0' } }