RANDOM(1)
π RANDOM(1) β the perl one, bestie β¨
okay so real talk, this is a User Contributed Perl Documentation page, and the whole vibe is "tiny program, does one thing, ate." let's get into it π
β¨ NAME β¨
random β the little tool that either shows you random lines or dips out with a random exit value. main character energy, honestly π
π¦ SYNOPSIS π¦
random [-er] [denominator]
that's it. that's the whole thing. iconic π
πΈ DESCRIPTION πΈ
so here's the tea π β random reads lines from standard input, and then it shows each line on standard output with a chance of 1 / denominator. yes, like a lil probability gatekeeper. ngl that's kind of a serve.
but wait, there's more π β if you pass the -e option, random doesn't do the line thing at all. instead it just exits with a value randomly choosen from 0 to "denominator - 1" inclusive. so it's giving "I'm not reading your input, I'm just picking a number and leaving." lowkey relatable π
and if you don't give a denominator at all? no worries bestie, it just uses 2. default slay β¨
π OPTIONS π
random accepts the following options, and there are literally two of them so you have no excuse:
-eβ exit with a value randomly choosen from0to"denominator - 1"inclusive. it does not read input, and it does not display output. like, at all. it's out π«Ά-rβ use unbuffered output. yes queen, no buffering, straight to the output π¨
π§ ENVIRONMENT π§
okay so plot twist β nothing. the working of random is not influenced by any environment variables. not one. your env vars can stay home, this program doesn't want them π
π BUGS π
there are no known bugs in random.
not me being obsessed with a program that justβ¦ works. no cap, she's flawless (allegedly π). if you find one, that's between you and the universe π
π AUTHOR π
the Perl implementation of random was written by Abigail, and you can reach her at perlpowertools@abigail.be. shoutout to the legend, fr fr π
π COPYRIGHT and LICENSE π
this program is copyright by Abigail 1999. vintage. retro. timeless β
this program is free and open software. you may use, copy, modify, distribute and sell this program (and any modified variants) in any way you wish, provided you do not restrict others to doing the same. so go off, remix it, sell it, do whatever β just don't gatekeep it, bestie, that's the one rule π«Άβ¨
and that's the whole page! brought to you by perl v5.42.2, dated 2026-02-15 β a lil timestamp from the future, and honestly? she's timeless π bye bestie, go randomize something π¦
π¦ where this page comes from
- alpine 3.24: perl-power-tools-doc 1.053-r1 Β· GPL-2.0-or-later AND Artistic-1.0-Perl AND Artistic-2.0 AND BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms