# Get reference number. if ($line =~ m/BAC:\s*(.*)\s*$/) { $ac_id = $1; }