Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 44 lines (42 sloc) 0.609 kb
ea3a2ee [STD5] add mangle.pl
lwall authored
1 package main;
2
3 sub mangle {
4 my @list = @_;
5 for (@list) {
6 s/\`/Grave/g;
7 s/\~/Tilde/g;
8 s/\!/Bang/g;
9 s/\@/At/g;
10 s/\#/Sharp/g;
11 s/\$/Dollar/g;
12 s/\%/Percent/g;
13 s/\^/Caret/g;
14 s/\&/Amp/g;
15 s/\*/Star/g;
4a3d3fa [STD] strip out all the bogus $STOP stuff
lwall authored
16 s/\(/Paren/g;
17 s/\)/Thesis/g;
ea3a2ee [STD5] add mangle.pl
lwall authored
18 s/\-/Minus/g;
19 s/\+/Plus/g;
20 s/\=/Equal/g;
21 s/\{/Cur/g;
22 s/\}/Ly/g;
23 s/\[/Bra/g;
24 s/\]/Ket/g;
25 s/\|/Vert/g;
26 s/\\/Back/g;
27 s/\:/Colon/g;
28 s/\;/Semi/g;
29 s/\'/Single/g;
30 s/\"/Double/g;
31 s/\</Lt/g;
32 s/\>/Gt/g;
33 s//Fre/g;
34 s//Nch/g;
35 s/\,/Comma/g;
36 s/\./Dot/g;
37 s/\?/Question/g;
38 s/\//Slash/g;
39 s/(\W)/sprintf("_%02x_",ord($1))/eg;
40 }
41 join '_', @list;
42 }
43 1;
Something went wrong with that request. Please try again.