Thread Shell-Error durchs benutzen von ``
(36 answers)
Opened by FlorianL at 2008-01-21 15:12
aus
Code: (dl
)
1 50: my @diff = <TMP>; mach Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 my @order; while( my $line = <TMP> ){ if ( $line =~ m/^(.+):\s+\/.+:$/) { push @order, [$1."\n"]; } elsif ( $line =~ m/(^\d+)\s+(.+)\s+(.)\s+(\d+)\s+(.+)\s+$/ ) { if ($3 eq "\|") { push @{ $order[-1] },"\t$2\t$1\t$4\t" . "Diff: " . abs($1 - $4) . "\n"; } elsif ($3 eq "\<") { push @{ $order[-1] }, "\tNew File:\t$5\tSize: $4\n"; } elsif ($3 eq "\>") { push @{ $order[-1] },"\tFile deleted:\t$5\n"; } } } OTRS-Erweiterungen (http://feature-addons.de/)
Frankfurt Perlmongers (http://frankfurt.pm/) -- Unterlagen OTRS-Workshop 2012: http://otrs.perl-services.de/workshop.html Perl-Entwicklung: http://perl-services.de/ |