You need to change the encoding from DOS cp437 (assuming English codepage) to Latin-1 or utf-8.
use Encode; my $result = `ping -n 1 "jenda.krynicy.cz" ` . "\n"; print "result: $result\n\n"; my $latinresult = $result; Encode::from_to($latinresult, 'cp437', 'iso-8859-1'); if ($latinresult =~ /zeitüberschreitung/i) { #ping timed out, something is wrong with the repository print "Ping timed out for $domain: \n\n $result \n\n"; } else { #good repository. print "$domain passed ping: \n"; print `ppm repository add $repository $location` . "\n\n"; }
Note: this only addresses the encoding problem, there are several other potential problems with the script
In reply to Re: matching german characters output from system call.
by thundergnat
in thread matching german characters output from system call.
by tphyahoo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |