Help for this page

Select Code to Download


  1. or download this
    my $out .= "var ";
    
    my $out .= "var ";
    
  2. or download this
    (Shapes => 
      [ 
        { Type => 'Circle', Diameter => 2, Center => [0,1] }, 
    ...
        [ {x => 1, y => 1}, {x => 3, y => 1}, {x => 4, y => 2}, {x => 2, y
    + => 2} ]
      ]
    );
    
  3. or download this
    var is a HASH with 5 keys
            the keys are 'age', 'fname', 'kids', 'last_name', 'occupation'
            key 'kids' is an ARRAY containing HASHREFs:
    ...
                    key 'title' is a SCALAR
                    key 'years_on_job' is a SCALAR
            key 'last_name' is a SCALAR
    
  4. or download this
    use v5.14;
    
    use strict;
    ...
    introspect(\@array, \%out);
    say pp \%out;
    say YAML::Dump(\%out);
    
  5. or download this
    {
      ARRAY => {
        HASH => {
    ...
              SCALAR: 1
            years_on_job:
              SCALAR: 1
    
  6. or download this
      elsif (ref $data eq 'REF')
      {
        introspect($$data, ($output->{'REF'} //= {}));
      }