On Thu, 05 Oct 2006 10:43:38 +0800, Mug wrote: > I have a module that converts Chinese text between Big5 and GB2312. > and I have write my own /PrintCh() /as an exported sub. > > However, I am looking for more, can I silently /tie print() /or /tie > STDOUT / > something ? and whenever I /print()/ anything, it will pass to my script > to detect > remote browser's default language and to do the translation, and print > out proper /charset/ content ?
You wouldn't tie print(), you would override it. Except that you can't, because print() is one of a few non-overridable functions due to its special syntax (the optional filehandle). You could tie STDOUT; see perldoc perltie and scroll down to 'Tying Filehandles'. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>