Basic Perl script
#!/usr/bin/perl
use strict;

sub cat {
	my ($hair, $name, $weight) = @_;
	my %cat = (
		hair => $hair,
		name => $name,
		weight => $weight,
	);
	return %cat;
}

sub purr {
	my ($cat, $volume) = @_;
	return $cat->{'weight'} * $volume;
}


my %kitty = cat('black', 'Spook', 3.2);
print purr(\%kitty, 3);