modify( \$val ); sub modify { my $ref = shift; $$ref ++; # or whatever }