#!/usr/bin/perl -w use strict; use warnings; main(); sub main { my %hash = (); $hash{'check'} = 'klappt'; test(\%hash); print "2: $hash{'0'}\n"; } sub test { my ($ref) = shift; my %hash = %$ref; print "dref: $hash{'check'}\n"; $hash{'0'} = 'klappt nicht'; print "1: $hash{'0'}\n"; }