At 12:20 PM 5/6/04 -0700, Robert Murray wrote:
Thanks for the quick reply, Timm.

OK, I can understand why I would have to do that.   But I really don't want
to do that, because I'm going to send the user an email with the URL later.
I just want to create the file, which it does, so really my only
problem/confusion is the error message itself.   I don't understand why I'm
getting it.  I want it to go away.

Since the return value when using print_to is undef, the print statement becomes:


print undef;

Which causes the exact warning message you are getting. Your choices are to either keep the print_to call out of the print statement, or shut off warnings.


Robert


> -----Original Message----- > From: Timm Murray [mailto:[EMAIL PROTECTED] > Sent: Thursday, May 06, 2004 12:01 PM > To: Robert Murray; [EMAIL PROTECTED] > Subject: Re: [htmltmpl] print_to error > > > At 11:49 AM 5/6/04 -0700, Robert Murray wrote: > <snip> > >Now the thing is, my code WORKS FINE. It creates the page, I > can email it, > >click on the link in the email and get to it, etc. It's just > bugs me that > >when I run the program, I get: > > > > Use of uninitialized value in print at make_renewals.pl line 263, <> > >line 1. > > > >Line 263 in my script is: > > > > print $spage->output(print_to => *WEBFILE); > <snip> > > > From the HTML::Template documentation: > > The return value is undefined when using the "print_to" option. > > If you want to print to both the the *WEBFILE file handle and to > the user, > then you need two output() operations: > > $spage->output( print_to => * WEBFILE ); > print $spage->output(); > > Or, if you only want to print the template to the *WEBFILE file handle, > then you do without the second line. >



-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
_______________________________________________
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users

Reply via email to