Leser: 1
|< 1 2 >| | 11 Einträge, 2 Seiten |
1
2
3
4
5
6
7
....
Part Value Package Library Position (inch) Orientation
C2 220µF TT5D11L rcl (3.5 1.55) R180
CON1 24V in FLACHST_W2P ETG_con_flach (2 0.5) R90
CON2 F09HP con-subd (3.25 2.05) R0
....
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/local/bin/perl
use strict;
use warnings;
<DATA>;
while (<DATA>) {
chomp;
next if /^$/;
print join ("#", split /\s\s+/ ) ,"\n";
}
_ _ DATA _ _
Part Value Package Library Position (inch) Orientation
C2 220µF TT5D11L rcl (3.5 1.55) R180
CON1 24V in FLACHST_W2P ETG_con_flach (2 0.5) R90
CON2 F09HP con-subd (3.25 2.05) R0
chomp;
next if /^$/;
print join ("#", split /\s\s+/ ) ,"\n";
print join ("#", split /\s\s+/ ) ,"\n";
print join ("#", split /\s{2,}/) ,"\n";
1
2
3
4
5
6
7
8
9
10
my @pos;
my $s = <DATA>;
my $lastpos = 0;
while ( $s =~ /\s\s\S/g ) {
# Position, Länge
push( @pos, $lastpos, pos( $s ) - $lastpos - 1 );
$lastpos = pos($s);
}
|< 1 2 >| | 11 Einträge, 2 Seiten |