Help for this page
my $FH_text_W = $main::FH_text_W;
package MyPkgDirectory::MyPkg; # assumes MyPkgDirectory/MyPkg.pm ... .... print {$self->{HANDLE}} "SHEET $sheet\n"; # Need funny braces to un +-confuse "print" }
... # No Pre-declaration. the handle is now a local open(my $FH_text_W, $wmode, $filename) or die "ERROR: cannot open $f +ilename for writing $!"; my $pkg = MyPkgDirectory::MyPkg::->new( $FH_text_W); $pkg->samplewrite(10, "foofoo");