Replaced regex gibberish with quotemeta

This commit is contained in:
Pragmatic Software 2009-12-28 18:25:43 +00:00
parent 0275e90dc8
commit b3b3c04f73
1 changed files with 2 additions and 15 deletions

View File

@ -10,21 +10,8 @@ if ($#ARGV < 0) {
my $command = join(' ', @ARGV);
$command =~ s/-[^ ]+//g;
$command =~ s/\\//g;
$command =~ s/;/\\;/g;
$command =~ s/\(/\\(/g;
$command =~ s/\)/\\)/g;
$command =~ s/\$/\\\$/g;
$command =~ s/\[/\\[/g;
$command =~ s/\]/\\]/g;
$command =~ s/\|/\\|/g;
$command =~ s/'/\\'/g;
$command =~ s/`/\\`/g;
$command =~ s/,/\\,/g;
$command =~ s/\*/\\*/g;
$command =~ s/\?/\\?/g;
$command = quotemeta($command);
$command =~ s/\\ / /g;
#print "[$command]\n";
my $result = `/usr/bin/cdecl -c $command`;