☰郭樂聰☷ ☯βαggiσ☯ > Acme-Schrodinger-Do-0.04 > Acme::Schrodinger::Do

# NAME

Acme::Schrodinger::Do - do block occasionally

# SYNOPSIS

```  use Acme'Schrodinger'Do;
sdo {kill \$the,\$cat} '50%';
sdo {kill \$the,\$cat} 50 => 10                       # 10 boxes and cats
doAny {kill \$cat, \$number1}
sub {kill \$cat, \$number2}
, sub {kill \$cat, \$number3}
, sub {kill \$cat, \$number4};                        # do any one block```

# DESCRIPTION

You won't know if Perl will do it, until you run the script

## EXPORT

sdo BLOCK sdo BLOCK Probablilty sdo BLOCK Probability => Iterate

```        sdo {print 'Never Print',"\n"} '0%';              # never print
sdo {print 'The `%\' can be ommited!',"\n"} 0;    # same as above
sdo {print 'Just do it!',"\n"} 100;               # like 'do' block
sdo {print 'Just do it!',"\n"};                   # like 'do' block
sdo {print 'do it three times!'} 100 => 3;        # do for 1..3```

doAny BLOCK(S)

```        doAny {'???'}               # (100/1)% doing block
doAny {'???'} sub {'???'}   # (100/2)% foreach block
doAny {'???'}
sub {'???'}
, sub {'???'};              # (100/3)% for each block```

http://en.wikipedia.org/wiki/Schr%C3%B6dinger%27s_cat

# AUTHOR

Kwok Lok Chung, Baggio <rootkwok@cpan.org>