1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
#!/usr/bin/perl -w use strict; my @tag_a; my @pos_i1; my @pos_i2; my @name; my $datei; my $tr_id; my $zeile; my $zeile_1; my $p1; my $p2; my $id; my $i; my $itag; my $ok; my $max_i; our $plus; my $k; ... open (IN,"<$datei") || die $!; while(<IN>){ ... $plus = 0; while($i <= $max_i - 1){ ... if ($zeile eq $tag_a[$i]){ ... SWITCH: { $i == 0 && do { print "$name[$i]: $_"; last SWITCH; }; $i == 1 && do { $plus = -1; print "$i Plus: $plus\n"; last SWITCH; }; =====> $i == 2 && do { print "=====> $i $plus\n"; $k = $i + $plus; print "$k $name[$k]: $_"; last SWITCH; }; $i == 3 && do { print "$name[$i]: $_"; last SWITCH; }; print "\$i is not in 0..3\n"; } $i = $i + 1; } else { $i = $i + 1; } } } close IN;