Skip to content

Instantly share code, notes, and snippets.

@brianmed
Created October 22, 2013 02:07
Show Gist options
  • Select an option

  • Save brianmed/7094160 to your computer and use it in GitHub Desktop.

Select an option

Save brianmed/7094160 to your computer and use it in GitHub Desktop.
use IO::String;
$io = IO::String->new("one\ntwo\nthree\nfour\nfive\n");
$line = (<$io>)[int(rand(5))];
print($line);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment