in reply to Re: Getting data *INTO* __DATA_
in thread Getting data *INTO* __DATA_

Have you seen Conway and Ingerson's evil Inline::Files yet? This is way cool:
use strict; use vars qw($DATA); use Inline::Files; open DATA or die $!; chomp ($_ = <DATA>); close DATA or die $!; print "you have run this script @{[++$_]} times\n"; open DATA, ">$DATA" or die $!; print DATA $_; close DATA or die $!; __DATA__ 0

jeffa

you have run this script 1 times? grammar shmammar ;)

Replies are listed 'Best First'.
Re: (jeffa) 2Re: Getting data *INTO* __DATA_
by Zucan (Beadle) on Jul 09, 2002 at 03:34 UTC
    Hmmm... You guys really got my wheels turning on this one :-) So, now, I am invisioning the use of both HTML::Template and Inline::Files. For example, in a login script using cookies as the method or remembering a previous login, I can see a template section for __LOGGEDIN__ and __LOGGEDOUT__ with totally different HTML content. Anyways, thanks for the tips, they have been quite helpful. I will post an update when I get the code written (which will be tomorow, as it is now bed time for me!)