in reply to Re: Why won't say act like say when its tied?
in thread Why won't say act like say when its tied?
print appends the value of $\ to the end of whatever is passed to print, so if $\="***\n", then {print "hello", "\n"; } outputs "hello\n***\n" not plain "hello\n". That's why it is important for say to set local $\="\n" and not just add "\n" to the end of the list of things to print. Hope that helps.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Why won't say act like say when its tied?
by Anonymous Monk on Mar 07, 2011 at 19:45 UTC |
In Section
Seekers of Perl Wisdom