summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-06-16 19:32:48 +0200
committerJules Laplace <julescarbon@gmail.com>2018-06-16 19:32:48 +0200
commit9a9e5fb7bffb0ca2512ac2ccb1031edd478a0a02 (patch)
tree7e4d3a155617db49b8e54aec72419383049e1118
parent6bdcb683942c0c17445ed6b0840b9958ac9845d9 (diff)
get
-rwxr-xr-xget.pl2
1 files changed, 2 insertions, 0 deletions
diff --git a/get.pl b/get.pl
index 42a7983..2713fe2 100755
--- a/get.pl
+++ b/get.pl
@@ -8,6 +8,8 @@ sub sanitize ($) {
$s =~ s/\W/_/g;
$s =~ s/[\(\)]/_/g;
$s =~ s/\s+/_/g;
+ $s =~ s/_+$//g;
+ $s =~ s/^_+//g;
if (length($s) == 0) {
print "fn is empty";
exit(1);