kokarikomi has asked for the wisdom of the Perl Monks concerning the following question:
I have an error with the print $file ... which says 'Can't use string ("file1") as a symbol ref while "strict refs" in use' Someone can help me with that? Thank you, R.my @filez=(file1,file2); open(file1,">$path1"); open(file1,">$path2"); for (my $i=0 ; $i ; $i<$node_nb; $i++) { $file=$filez[$i]; print $file "some data"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem with File Handler
by davido (Cardinal) on Jun 10, 2004 at 19:15 UTC | |
|
Re: Problem with File Handler
by BrowserUk (Patriarch) on Jun 10, 2004 at 21:08 UTC | |
|
Re: Problem with File Handler
by graff (Chancellor) on Jun 10, 2004 at 23:09 UTC | |
|
Re: Problem with File Handler
by calin (Deacon) on Jun 10, 2004 at 19:08 UTC |