>>> 1 + 1 2
>>> 'foo' 'foo' >>> undef undef
>>> [1, 2, 3, {foo => 'bar', bar => 'foo'}] [1, 2, 3, {bar => 'foo', foo => 'bar'}]
>>> 90 / ( ... 4 + 5 ... ) 10
>>> [1, 2, 3, {foo => 'bar', bar => 'foo'}] [ 1, 2, 3, {bar => 'foo', foo => 'bar'} ]
>>> [1, 2, 3, {foo => 'bar', bar => 'foo'}] [1, 2, 3, ignore] >>> [1, 2, 3] bag(3, 1, 2)
$ 1 + 1 2
>>> my $foo = 10 10
...are local to the end of the block.
>>> $foo *= 2 20
...and to the end of consequent blocks with the same name.
>>> $foo *= 2 40
>>> no strict 'vars' >>> $foo undef
>>> foo() 5
>>> my $a = [1, 2, 3] >>> $a [1, 2, 3] >>> push(@$a, 4) >>> $a [1, 2, 3, 4]
To install Test::Doctest, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Doctest
CPAN shell
perl -MCPAN -e shell install Test::Doctest
For more information on module installation, please visit the detailed CPAN module installation guide.