Created
November 11, 2015 10:59
-
-
Save h4ck3rm1k3/c84e05906e70549aea94 to your computer and use it in GitHub Desktop.
No agenda donation generator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my $data = <<END; | |
shut up slave | |
in the morning | |
hit people in the mouth | |
glitch | |
deconflicting | |
juice | |
END | |
my $btc = 326.43; | |
my $t = 0; | |
print "<table border='1' cellpadding='1' cellspacing='1' style='width:50%;background-color:#ffffcc;border-collapse:collapse;border:1px solid #ffcc00'>"; | |
print "<thead><tr><th>Term</th><th>Ascii</th><th>Bitcoin</th><th>Total</th></tr>\n</thead><tbody>"; | |
for my $l (split("\n",$data)) { | |
my $l2 = "0."; | |
for my $c (split("",$l)) { | |
my $o = unpack("W",$c); | |
$l2 .= $o; | |
#print "C : $c $o\n"; | |
} | |
my $b = $btc * $l2; | |
$t += $b; | |
print "<tr> | |
<td>$l</td> | |
<td>$l2</td> | |
<td>$b</td> | |
<td>$t</td> | |
</tr>\n"; | |
} | |
print "</tbody></table>"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment