#!/usr/bin/perl -w use strict; use warnings; my @arr = ('a','b'); my %has = ( foo => 'bar', bar => 'foo', ); test (\@arr); test (\%has); sub test { print "bekomme: " . ref ($_[0]) . "\n"; }