This is the first time I used tie for anything other than tieing an array to a file. Not terribly obscure, but I thought it was a nifty trick.

use strict;use warnings;tie my$t,'A';$t=".rekcah lreP rehtona tsuJ"; print while$_=$t;package A;sub TIESCALAR{bless\my$s,shift}sub STORE{ ${$_[0]}=$_[1]}sub FETCH{chop${$_[0]}}

As an added bonus, this one runs fine under strictures and warnings.


Dave


"If I had my life to live over again, I'd be a plumber." -- Albert Einstein

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.