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 ".. Examining the file $SchDesign \n";
  
  open SCH, "< $SchDesign" or die "Can't open $SchDesign"; { 
    local $/ = ".ENDS\n";
    while (<SCH>) {
      print $/;
      push @SchCells, /^\.SUBCKT\s+(\S+)/m;
    }
  }
  close SCH;    
   for (my $j = 0; $j < @SchCells; $j++){
        print "$SchCells[$j] ";
  }
}


On Thursday 28 February 2002 10:15 am, Jeff 'japhy' Pinyan wrote:
> 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;

-- 

 Steven M. Klass
 Physical Design Manager

 National Semiconductor Corp
 7400 W. Detroit Street
 Suite 170
 Chandler AZ 85226

 Ph:480-753-2503
 Fax:480-705-6407

 [EMAIL PROTECTED]
 http://www.nsc.com


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to