Skip to content

Instantly share code, notes, and snippets.

View gist:81ae6821f8d3d70f4888a409694c53dc
when HTTP_REQUEST {
set coffee { 5)3;; 4(3;; 2+1-5+1;; 2|1 5|1]1;; 2\1-5/1;;_9_2;;\1_9/1}
set response "Coffee 3.0\n\n"
switch [HTTP::uri] {
"/coffee" {
foreach {mychar myrepeat} [ split $coffee {} ] {
if {$mychar equals ";"} {
append response "[format "%-15s" $cuppa]$cuppa\n"
unset cuppa
} else {