in reply to Tie::Hash::Regex to hash reference?

Are there things that I did not try which would have been likely to succeed.

Not really :) but see next part

Is there a way to use that reference directly with Tie::Hash::Regex without making the copy?

Its not really important :) but see next part

#!/usr/bin/perl -- use strict; use warnings; use Tie::Hash::Regex; Main( @ARGV ); exit( 0 ); sub Tie::Hash::Regex::TIEHASH { my( $class, $ref ) = @_; $ref ||= {}; return bless $ref, $class; } sub Main { my $sing = bless setSome(), 'Tie::Hash::Regex'; my %song; tie %song, 'Tie::Hash::Regex', setSome(); print $sing->FETCH(qr/pe/i), "\n"; print $song{qr/by/i}, "\n"; #~ typeSome( \%song ); #~ typeSome( $sing ); } sub setSome { my( $song ) = @_;; $song ||= {}; $song->{Peter} = "I Am Peter, Hear Me Roar"; $song->{Byrne} = "When I have nothing to say, my lips are sealed." +; $song; } sub typeSome { my( $song ) = @_; while( my( $writer, $song ) = each %$song ){ print "$writer: $song\n"; } } __END__

And this is the point you should consider perlobj :)