Sorry... the email is unfinished, the reason why I need to do this is because I don't want to pollute the existed codes / context ... the original print statements would like to retain, but I can still do the translations by adding : use OverridePrint; in a common module that all existed scripts are now using.
package OverridePrint; > > use strict; > > # WHAT CAN I DO HERE ??? > > 1; > > # Main Program use OverridePrint; print "Goodbye World" ; # I got "GBK : Goodbye World" > > $mode = "BIG5" ; > print "Hello World" ; # I got "BIG5 : Hello World" > > I don't want to write another sub like Print ( $case, $mesg ) , but > directly override the print behavior. > > In the real story, the structure is more complex. Default will print in > English, with user request ( argv ), > will print in BIG5 CHinese, and with Browser detection, will translate to > GBK.