Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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