Expect multiple values
use strict;
use warnings;
my $x = rand();
if ($x < 0.3) {
print "abc\n";
} elsif ($x < 0.6) {
print "def\n";
} else {
print "xyz\n";
}
{% embed include file="src/examples/expect/random.t)
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
use strict;
use warnings;
my $x = rand();
if ($x < 0.3) {
print "abc\n";
} elsif ($x < 0.6) {
print "def\n";
} else {
print "xyz\n";
}
{% embed include file="src/examples/expect/random.t)