Mailing List Archive

strange things with files
Hello All,
I am having the problem with saving data to the file. Script looks like
this:
[.* $myfile="/path/to/my/file";
open (OUT, ">$myfile) || die "Could not write to $myfile";
print OUT $fdat{mydata};
close (OUT);
*]
What happens is I have the empty file (0 bytes), and the Internal Server
Error:
ERR:24: Line XX: Error in Perl Code: Can't locate object method "CLOSE"
via package "HTML::Embperl::Out" at /full/path/to/my/script.epl line XX.

Any ideas of what I am doing wrong?

--
Best regards,
Leonid Mamtchenkov
System administrator
J.F.Services Ltd. (Limassol, Cyprus)
E-mail: leonid@jfs-cy.com
Re: strange things with files [ In reply to ]
Hello All,
> I am having the problem with saving data to the file. Script looks like
> this:
> [.* $myfile="/path/to/my/file";
> open (OUT, ">$myfile) || die "Could not write to $myfile";
> print OUT $fdat{mydata};
> close (OUT);
> *]
> What happens is I have the empty file (0 bytes), and the Internal Server
> Error:
> ERR:24: Line XX: Error in Perl Code: Can't locate object method "CLOSE"
> via package "HTML::Embperl::Out" at /full/path/to/my/script.epl line XX.
>
> Any ideas of what I am doing wrong?
>

OUT is a presetup filehandle used by Embperl. Choose another name.

Gerald
Re: strange things with files [ In reply to ]
> >
> > OUT is a presetup filehandle used by Embperl. Choose another name.
>
> Maybe _OUT or __OUT would be less likely to collide with user choices?
>

Yes, of course, but it's been there for about 3 years and I can't simply
rename it

Gerald

-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925151
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------