Help for this page

Select Code to Download


  1. or download this
    use Class::Struct;
    struct ( 'Structname', { value1 => '$', value2 => '$' } );
    my $mystruct = new Structname;
    #here we set value1 and value2
    $value = &myfunction($mystruct);
    
  2. or download this
    sub myfunction {
    use strict;
    ...
    $mystruct = $ARGV[0];
    return $mystruct->value1." ".$mystruct->value2;
    }