Hi all,
I am just about to study about tie, and I've made a very simple test, but
don't know what's wrong, would anyone please to point out ?
# Mask
package Mask;
sub TIEHANDLE { my $x; bless \$x; shift }
sub PRINT { $_ = $$_[0]; s/./*/g; print}
1;
__END__
# main
# usuw;
use Mask;
tie *STDOUT, 'Mask';
print "Hello"; # prints Hello
print STDOUT "Hello" ; #still prints Hello
__END__
Actually, I've tried to print @_ inside the block of sub PRINT,
I can see that already prints nothing... but why ? Is that mean
the tie isn't success or what ?
Then I put a die "can't tie $!" after tie, it really dies, but $! have
nothing on it.
I do expect that I will have either with STDOUT or not will
results to print ***** . What's wrong here ? And how can I make
it done ?
Thanks,
Bee