Hi all,
That only seems to grab the first one. I also have comments(denoted by *
foobar) and white space lines, and other .BAR where .BAR is any number of
things I want to ignore.
sub GetSchCellName {
my ($SchCell, $strName, @SchCells, %seen);
my $SchDesign = $_[0];
print ".. Examinin
On Feb 28, Jeff 'japhy' Pinyan said:
>And then extracting the first chunk of non-whitespace after ".SUBCKT":
>
> push @names, /^\.SUBCKT\s+(\S+)/;
Sorry, that regex should have an /m modifier on it.
push @names, /^\.SUBCKT\s+(\S+)/m;
>}
> }
> close FILE;
--
Jeff "japhy" Pinyan
On Feb 28, Steven M. Klass said:
>I want to create an array of names I don't yet know. Basically I have a
>text file that does this
>
>.SUBCKT FOO blah blah
>blah
>blah
>.ENDS
>
>.SUBCKT BAR blah blah
>blah
>blah
>.ENDS
>
>I want my array to capture FOO BAR
I'd suggest using "\n.ENDS\n" as yo
Hi all
I want to create an array of names I don't yet know. Basically I have a
text file that does this
..SUBCKT FOO blah blah
blah
blah
..ENDS
..SUBCKT BAR blah blah
blah
blah
..ENDS
I want my array to capture FOO BAR
I am not sure how to do this..
Thanks so much
--
Steven