Re: Interpolate variable in a __DATA__ block

2008-03-30 Thread Gunnar Hjalmarsson
Trudge wrote: On Mar 30, 8:13 am, [EMAIL PROTECTED] (Chas. Owens) wrote: If you have multiple templates you might want to use Inline::Files* instead of a straight DATA block. Chas. I've installed this and gave it a quick whirl. While it does print OK from various blocks, I couldn't get it to

Re: Interpolate variable in a __DATA__ block

2008-03-30 Thread Gunnar Hjalmarsson
[EMAIL PROTECTED] wrote: Gunnar Hjalmarsson wrote: Trudge wrote: Now I know it can be done, so I will be exploring this method. Not much to explore, really. Did you read the applicable Perl FAQ? Even if it provides this method, it doesn't exactly recommend it... Besides full-blown templat

Re: Interpolate variable in a __DATA__ block

2008-03-30 Thread aneely
Gunnar Hjalmarsson wrote: Trudge wrote: On Mar 29, 4:05 pm, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote: Trudge wrote: I'm trying to get a script to interpolate variable values in a __DATA__ block if possible. It can be done; see the FAQ entry perldoc -q "expand variables"

Re: Interpolate variable in a __DATA__ block

2008-03-30 Thread Trudge
On Mar 30, 8:13 am, [EMAIL PROTECTED] (Chas. Owens) wrote: > On Sat, Mar 29, 2008 at 9:14 PM, Trudge <[EMAIL PROTECTED]> wrote: > > > On Mar 29, 4:05 pm, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote: > > > Trudge wrote: > > > > I'm trying to get a script to interpolate variable values in a > > >

Re: Interpolate variable in a __DATA__ block

2008-03-30 Thread Trudge
On Mar 30, 8:13 am, [EMAIL PROTECTED] (Chas. Owens) wrote: > On Sat, Mar 29, 2008 at 9:14 PM, Trudge <[EMAIL PROTECTED]> wrote: > > > On Mar 29, 4:05 pm, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote: > > > Trudge wrote: > > > > I'm trying to get a script to interpolate variable values in a > > >

Re: Interpolate variable in a __DATA__ block

2008-03-30 Thread Chas. Owens
On Sat, Mar 29, 2008 at 9:14 PM, Trudge <[EMAIL PROTECTED]> wrote: > > On Mar 29, 4:05 pm, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote: > > Trudge wrote: > > > I'm trying to get a script to interpolate variable values in a > > > __DATA__ block if possible. This is a kind of alternative to a ful

Re: Interpolate variable in a __DATA__ block

2008-03-30 Thread Gunnar Hjalmarsson
Trudge wrote: On Mar 29, 4:05 pm, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote: Trudge wrote: I'm trying to get a script to interpolate variable values in a __DATA__ block if possible. It can be done; see the FAQ entry perldoc -q "expand variables" while () {

Re: Interpolate variable in a __DATA__ block

2008-03-30 Thread Trudge
On Mar 29, 4:05 pm, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote: > Trudge wrote: > > I'm trying to get a script to interpolate variable values in a > > __DATA__ block if possible. This is a kind of alternative to a full- > > blown template method. I'm not sure if I can even do what I want, > > hen

Re: Interpolate variable in a __DATA__ block

2008-03-29 Thread Gunnar Hjalmarsson
Rob Dixon wrote: Gunnar Hjalmarsson wrote: Trudge wrote: I'm trying to get a script to interpolate variable values in a __DATA__ block if possible. This is a kind of alternative to a full- blown template method. I'm not sure if I can even do what I want, hence my posting here. It can be don

Re: Interpolate variable in a __DATA__ block

2008-03-29 Thread Rob Dixon
Gunnar Hjalmarsson wrote: > > Trudge wrote: >> >> I'm trying to get a script to interpolate variable values in a >> __DATA__ block if possible. This is a kind of alternative to a full- >> blown template method. I'm not sure if I can even do what I want, >> hence my posting here. > > It can be done

Re: Interpolate variable in a __DATA__ block

2008-03-29 Thread John W. Krahn
Trudge wrote: I'm trying to get a script to interpolate variable values in a __DATA__ block if possible. perldoc -q "How can I expand variables in text strings" John -- Perl isn't a toolbox, but a small machine shop where you can special-order certain sorts of tools at low cost and in short o

Re: Interpolate variable in a __DATA__ block

2008-03-29 Thread Gunnar Hjalmarsson
Trudge wrote: I'm trying to get a script to interpolate variable values in a __DATA__ block if possible. This is a kind of alternative to a full- blown template method. I'm not sure if I can even do what I want, hence my posting here. It can be done; see the FAQ entry perldoc -q "expand va

Re: Interpolate variable in a __DATA__ block

2008-03-29 Thread Rob Dixon
Trudge wrote: > Hi Trudge. I'm trying to get a script to interpolate variable values in a __DATA__ block if possible. This is a kind of alternative to a full- blown template method. I'm not sure if I can even do what I want, hence my posting here. No, you can't do that. But see below. The f