#!/usr/bin/perl -w use strict; open(OUTFILE, ">out.txt") or die "cannot open out.txt: $!"; my $fred = {}; $fred->{outfile} = \*OUTFILE; my $barney = $fred->{outfile}; print $barney "This is a test\n"; print $fred->{outfile} "This is another test\n"; #### String found where operator expected at ./test.pl line 11, near "} "This is another test\n"" (Missing operator before "This is another test\n"?) syntax error at ./monks.pl line 11, near "} "This is another test\n"" Execution of ./test.pl aborted due to compilation errors.