view wisdom/select @ 8001:faebf4569ba3

<b_jonas> `` echo $\'#!/bin/sh\\nexec perl -e\\\'\'\'open$I,"<","share/mtg/allsets.txt"or die$!;$/=""; @c=grep{/(?i:$ARGV[0])/}<$I>; print $c[rand($c)];\'\\\'\' "$1"\' > bin/random-card && chmod -v a+x bin/random-card
author HackBot
date Mon, 09 May 2016 08:32:52 +0000
parents 1a4b688a59ae
children
line wrap: on
line source

select is a very versatile construct: it waits for events, retrieves data from tables, creates a list from elements of an input list that satisfy a condition, a dropdown list element, an event for when selection changes, branches between multiple arms, conditional between two expressions, prints a text-based menu prompt in a loop, and more.