Re: how to embed data in perl programs

2007-02-08 Thread Sharan Basappa
Thank you all for the suggestions. Based on discussion here, I went back and looked at my perl reference book. It looks like here-doc serves the purpose well. The answer was there but I did not know where to look .. Thanks .. PS: BTW Boliger, there is nothing wrong with your english. It is bette

Re: how to embed data in perl programs

2007-02-07 Thread D. Bolliger
Sharan Basappa am Mittwoch, 7. Februar 2007 16:13: > On 2/7/07, Rob Dixon <[EMAIL PROTECTED]> wrote: > > Sharan Basappa wrote: > > > On 2/6/07, Tom Phoenix <[EMAIL PROTECTED]> wrote: > > >> On 2/6/07, Sharan Basappa <[EMAIL PROTECTED]> wrote: > > >>> Question is how to embed text in a perl program

Re: how to embed data in perl programs

2007-02-07 Thread Ken Foskey
On Wed, 2007-02-07 at 20:43 +0530, Sharan Basappa wrote: > cmd line arg, the script needs to output one of these template files. > Definitely > I would not like to open a file, read it and then output it since moving the > script > (to another project etc) would mean that the files need to be moved

Re: how to embed data in perl programs

2007-02-07 Thread Rob Coops
Sharan, Personaly would make use of a hash variable where the templates are named by the key and the actual template is the value. This will give you the option to add more templates as and where needed. With a little time and effort more complex templates can be created if you expand upon the b

Re: how to embed data in perl programs

2007-02-07 Thread Sharan Basappa
Hi Rob, Actually I am writing a script that actually spits out various make template files. People then fill in these templates with neccessary details and use them. The thing is that there are atleast 4-5 different templates and depending on the cmd line arg, the script needs to output one of th

Re: how to embed data in perl programs

2007-02-07 Thread Rob Dixon
Sharan Basappa wrote: > On 2/6/07, Tom Phoenix <[EMAIL PROTECTED]> wrote: On 2/6/07, Sharan Basappa <[EMAIL PROTECTED]> wrote: Question is how to embed text in a perl program instead of reading it from a file or initializing the text in a string variable. Are you looking for here-documents?

Re: how to embed data in perl programs

2007-02-07 Thread Adriano Ferreira
On 2/7/07, Sharan Basappa <[EMAIL PROTECTED]> wrote: Hi Tom, What if I wanted to have multiple embedded (and separate) texts embedded in my program. Are you saying that I can have only one text section and that should have keyword DATA. Actually when I wrote example, I assumed that double unders

Re: how to embed data in perl programs

2007-02-07 Thread Sharan Basappa
Hi Tom, What if I wanted to have multiple embedded (and separate) texts embedded in my program. Are you saying that I can have only one text section and that should have keyword DATA. Actually when I wrote example, I assumed that double underscore tell the parser that a text section starts (so us

Re: how to embed data in perl programs

2007-02-06 Thread John W. Krahn
John W. Krahn wrote: > Sharan Basappa wrote: >>Question is how to embed text in a perl program instead of reading it >>from a file or initializing the text in a string variable. >> >>I have done the following but when I execute the script, I get no output. >> >>Is there an issue I am overlooking ?

Re: how to embed data in perl programs

2007-02-06 Thread John W. Krahn
Sharan Basappa wrote: > Question is how to embed text in a perl program instead of reading it > from a file or initializing the text in a string variable. > > I have done the following but when I execute the script, I get no output. > > Is there an issue I am overlooking ? > > Another question i

Re: how to embed data in perl programs

2007-02-06 Thread Tom Phoenix
On 2/6/07, Sharan Basappa <[EMAIL PROTECTED]> wrote: Question is how to embed text in a perl program instead of reading it from a file or initializing the text in a string variable. Are you looking for here-documents? Look in perlop under Quote and Quote-like Operators to see the different way

how to embed data in perl programs

2007-02-06 Thread Sharan Basappa
Question is how to embed text in a perl program instead of reading it from a file or initializing the text in a string variable. I have done the following but when I execute the script, I get no output. Is there an issue I am overlooking ? Another question is whether perl will replace the varia