if ($content =~ m{^\.SUBCKT\s+\S+\s+([\w.\s]+?[\w.]+)\s*$}i ) { my $name1 = $1; my @wds = split(/\s+/,$name1); ... }