37,720
社区成员
发帖
与我相关
我的任务
分享
#!/usr/bin/env perl
use strict;
use warnings;
use Data::Dumper;
my $nl = 0;
my $i = 0;
my @dats = [];
while (<DATA>) {
chomp;
if (/^\s*$/) {
$i++ if ($nl == 1);
$nl = 0;
next;
}
push @{$dats[$i]}, [split /\s*=\s*/];
$nl = 1;
}
print Dumper(\@dats);
__DATA__
type=dielectric
name=sti_base
thickness=0.07
eps=4
type=diffusion
name=diff_
thickness=0.25
min_width=0.072
min_spacing=0.099
#!/usr/bin/env perl
use strict;
use warnings;
use Data::Dumper;
my $nl = 0;
my $i = 0;
my @dats;
while (<DATA>) {
chomp;
if (/^\s*$/) {
$i++ if ($nl == 1);
$nl = 0;
next;
}
my($n, $v) = split /\s*=\s*/;
$dats[$i]->{$n} = $v;
$nl = 1;
}
print Dumper(\@dats);
__DATA__
type=dielectric
name=sti_base
thickness=0.07
eps=4
type=diffusion
name=diff_
thickness=0.25
min_width=0.072
min_spacing=0.099
src_drn=( nsd_ psd_ )
r_sheet=15
type=dielectric
name=sti
thickness=0.25
eps=4
type=contact
name=dfcont_
min_width=0.081
min_spacing=0.099
measured_from=diff_
measured_to=m1_
enclosure_up=0
enclosure_down=0.0135
n1=0.19683
n2=0
min_poly_cont_spacing=0.0495
#!/usr/bin/env perl
use strict;
use warnings;
use Data::Dumper;
my $nl = 0;
my $i = 0;
my %dats;
while (<DATA>) {
chomp;
if (/^\s*$/) {
$i++ if ($nl == 1);
$nl = 0;
next;
}
my($n, $v) = split /\s*=\s*/;
$dats{$i}->{$n} = $v;
$nl = 1;
}
print Dumper(\%dats);
__DATA__
type=dielectric
name=sti_base
thickness=0.07
eps=4
type=diffusion
name=diff_
thickness=0.25
min_width=0.072
min_spacing=0.099
src_drn=( nsd_ psd_ )
r_sheet=15
type=dielectric
name=sti
thickness=0.25
eps=4
type=contact
name=dfcont_
min_width=0.081
min_spacing=0.099
measured_from=diff_
measured_to=m1_
enclosure_up=0
enclosure_down=0.0135
n1=0.19683
n2=0
min_poly_cont_spacing=0.0495