Thread Zeilen löschen
(16 answers)
Opened by NitroXpress at 2016-02-13 12:13 Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 my @data = <DATA>; for (my $i=0; $i <= $#data -1; $i++) { my @current = split(" ", $data[$i]); my @next = split(" ", $data[$i+1]); if ($current[2] eq $next[2]) { $data[$i] = undef; } } print @data; __DATA__ G1 X50 F30000 G1 X100 F30000 G1 X100 F3000 $q =~ /(bb|[^b]{2})/
|