#!/usr/bin/perl my $string = "test me"; my %hash = parse($string); sub parse ( return ( a => \@a, b => \%b, c => $c } }