summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlookshe <lookshe@fumuga.com>2013-07-29 13:57:33 +0200
committerlookshe <lookshe@fumuga.com>2013-07-29 13:57:33 +0200
commitb3b232e37020499521a139e6111779e8fa8494bb (patch)
tree5119b1ee699ede69e920ba02efed612a69fbfd08
parenta9c679cba906cb8709966615523c93db1377e771 (diff)
handling for special characters in extension
-rw-r--r--file.pl17
1 files changed, 13 insertions, 4 deletions
diff --git a/file.pl b/file.pl
index da177c5..eb16920 100644
--- a/file.pl
+++ b/file.pl
@@ -11,6 +11,14 @@ use LWP::UserAgent;
my $type = $ARGV[0];
+$type =~ s/\?/\\\?/g;
+$type =~ s/\$/\\\$/g;
+$type =~ s/\(/\\\(/g;
+$type =~ s/\)/\\\)/g;
+$type =~ s/\[/\\\[/g;
+$type =~ s/\]/\\\]/g;
+$type =~ s/\^/\\\^/g;
+my $type_out = $ARGV[0];
my $file = $ARGV[1];
my $skipFile = $ARGV[2];
@@ -72,13 +80,14 @@ if ($found == 0) {
last;
}
$i++;
- print ".$type is $$list[$i]\n";
+ print ".$type_out is $$list[$i]\n";
$found++;
}
}
} else {
- print ".$type is $$text[0]\n";
- $found = 1;
+ # aktuell gibts das nimmer
+ #print ".$type_out is $$text[0]\n";
+ #$found = 1;
}
#for ($i = 0; $i <= $#$list; $i++) {
# if ($$list[$i] =~ /^Extension: $type$/i) {
@@ -87,7 +96,7 @@ if ($found == 0) {
# }
#}
if ($found == 0) {
- print ".$type not in database\n";
+ print ".$type_out not in database\n";
}
}