in reply to Scalars tied to logfiles

You should probably change your sample usage to include the possiblity that the file couldn't be opened.

tie $var, "Tie::Scalar::Logged", 'log.txt', '$var', [qw/all/] or die "Can't open log.txt - $!";