Help for this page

Select Code to Download


  1. 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;
    
  2. or download this
    
    sub foo{
    ...
    my $var = \(foo());
    say Dumper($var);
    # Prints $VAR = \'green';
    
  3. or download this
    use feature qw( say );
    use Data::Dumper;
    ...
    #          'blue',
    #          'green'
    #        ];