#!/usr/bin/perl use strict; use warnings; my $test = 'Hallo'; test(\$test); print $test; sub test{ my $ref = shift; $$ref = 'test'; }