fork(2) download
  1. #!/usr/bin/perl
  2. use strict;
  3. use warnings;
  4. package codons1;
  5. sub new {
  6. my $class = shift;
  7. return bless {}, $class;
  8. }
  9. sub bar{
  10. my %some_hash = (temperature=>"35");
  11. return %some_hash;
  12. }
  13. 1;
  14. package main;
  15. my $object = codons1->new();
  16. my %temp = $object->bar();
  17. print keys %temp;
Success #stdin #stdout 0s 3740KB
stdin
Standard input is empty
stdout
temperature