in reply to regexp help -- grab almost a whole string

my $circuit_id = ( $if_descr =~ /([^.]*)(?:\.(.*))?/ ? $1 . (defined($2) ? $2 : '') : undef );
But it can be shortened to
(my $circuit_id = $if_descr) =~ s/\.//;