satchboost has asked for the wisdom of the Perl Monks concerning the following question:
Right now, I'm getting an output of:#!/usr/misc/bin/perl5 -w use strict; my $blahblah = 5; my $ref_to_blahblah = \$blahblah; print "$$ref_to_blahblah\n"; fubar($ref_to_blahblah); print "$$ref_to_blahblah\n"; print "$$ref_to_blahblah\n"; sub fubar { $$_[0] = 4; print "$$_[0]\n"; return $_[0]; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Modifying outside variables in subroutines
by Fastolfe (Vicar) on Jan 15, 2001 at 19:59 UTC |