#! perl -slw use strict; package Test; sub new{ my( $class, $value ) = @_; return bless { content => $value }, $class; } sub content : lvalue { my( $self ) = shift; $self->{ content }; } 1; package main; my $thing = Test->new( 'empty' ); print $thing->content; $thing->content = 'the quick brown fox'; print $thing->content; $thing->content =~ s[\b(.)][\U$1]g; print $thing->content; __END__ P:\test>368057 empty the quick brown fox The Quick Brown Fox