b888 has asked for the wisdom of the Perl Monks concerning the following question:
Greetings.
I'm writing object that have to write into file. How can i store filehandle in $self?
I tried to use
open($self->{FILE}, ">>$self->{file_path}$self->{file_name}"); print $self->{FILE} "some text here\n"; close($self->{FILE});
But got error "String found where operator expected"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: open $self->{FILE}
by trammell (Priest) on Nov 05, 2004 at 15:44 UTC | |
by b888 (Beadle) on Nov 05, 2004 at 16:08 UTC | |
|
Re: open $self->{FILE}
by Prior Nacre V (Hermit) on Nov 05, 2004 at 15:49 UTC | |
|
Re: open $self->{FILE}
by JediWizard (Deacon) on Nov 05, 2004 at 15:40 UTC | |
by diotalevi (Canon) on Nov 05, 2004 at 17:04 UTC | |
|
Re: open $self->{FILE}
by radiantmatrix (Parson) on Nov 05, 2004 at 15:42 UTC | |
by revdiablo (Prior) on Nov 05, 2004 at 20:39 UTC | |
by radiantmatrix (Parson) on Nov 05, 2004 at 21:13 UTC |