in reply to open $self->{FILE}

First, I would advise you check the result of the open i.e.:

open($self->{FILE}, ">>$self->{file_path}$self->{file_name}") || die " +Could not open file $!\n";

That, however, does not solve your problem. I think that perl is getting confused by the ->. This works:

my $self = {}; open($self->{FILE}, ">> text.txt") || die "Could not open file : $!\n" +; my $fh = $self->{FILE}; print $fh "some text here\n"; close($self->{FILE});
May the Force be with you

Replies are listed 'Best First'.
Re^2: open $self->{FILE}
by diotalevi (Canon) on Nov 05, 2004 at 17:04 UTC
    perl is not confused by the ->.