in reply to Returning a tied scalar
or another way:sub int_monitor (\$ ) :lvalue { my $var=shift; print "$var\n"; $$var }; int_monitor(my $foo) = 14; print "$foo\n"; (int_monitor my $bar) = 15; print "$bar\n";
sub int_monitor (\$;$) { my $var=shift; print "$var\n"; $$var=shift if @_ }; int_monitor my $foo => 14; print "$foo\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Returning a tied scalar
by nobull (Friar) on Apr 16, 2005 at 13:15 UTC | |
by MarkusLaker (Beadle) on Apr 17, 2005 at 11:00 UTC |