#!/usr/bin/perl -wT use strict; open (FOO, '>/tmp/foobar') or die "Couldn't open /tmp/foo: $!\n"; my $self = { 'fh' => \*FOO}; print $self->{'fh'} "This is a test\n"; #### String found where operator expected at ./foo.pl line 5, near "} "This is a test\n"" (Missing operator before "This is a test\n"?) syntax error at ./foo.pl line 5, near "} "This is a test\n"" #### my $fh = $self->{'fh'}; print $fh "This is a test\n"; #### print scalar($self->{'fh'}) "This is a test\n";