- or download this
use feature qw( say );
use Data::Dumper;
...
my $var = \(foo()); # $var IS a reference to the last item of *list*
+(0, 1)
say Dumper($var);
# Prints $VAR = \1;
- or download this
sub foo{
...
my $var = \(foo());
say Dumper($var);
# Prints $VAR = \'green';
- or download this
use feature qw( say );
use Data::Dumper;
...
# 'blue',
# 'green'
# ];