# start the logfile slog "$logfile"; slog "=======================================START="; slog "= ".(scalar localtime); # do some stuff noslog; # send to another logfile slog "$another_logfile"; slog "=======================================START="; slog "= ".(scalar localtime); # do some stuff noslog; #### sub slog(@) { $::_slogfh||=new IO::File $_[0],">>"; print $::_slogfh @_,$/ }; sub noslog() { undef $::_slogfh };