Hi Troy:

         Thanks for the reply.

At 01:11 PM 8/8/01 -0400, you wrote:
>On Wednesday 08 August 2001 13:40, Ron Woodall wrote:
> >       How do I take a heredoc section and write it to an array? Any 
> suggestions?
>
>Hmmm, at the risk of not being helpful, can you explain what it is you're
>wanting to do?

         Ok, I've got the <head> section of 167 HTML pages that needs to be 
written out. Normally I'd use a heredoc structure to write directly to the 
file. In this instance, I need to modify the content before I write it to 
the file. The alternative is to write about 68 lines to an array, one line 
at a time and modify as I go. I've modified heredocs "on the fly" before 
and thought it would be handy to do it again. Unfortunately, I don't know 
how to write the heredoc to an array as I modify it.

>If you're wanting to save strings to an array and then iterate over them
>having them print out in a heredoc, try this:
>
>#!/usr/bin/perl
>
>use strict;
>use warnings;
>
>my @a = ( 'this is a test', 'this is also a test' );
>
>foreach( @a ){
>print<<TOHERE
>$_
>TOHERE
>}
>
>Otherwise, please give more of an explanation.

         I need to create the exact opposite. I want to write the heredoc 
to an array.

         Thanks for the help.

         Ron Woodall



>Regards,
>
>Troy

---------------------------------------
Ron Woodall
[EMAIL PROTECTED]

The Compendium of HTML Elements
"your essential web publishing resource"

- available at/disponible à:
http://au.htmlcompendium.org/index.htm (Australia)
http://www.htmlcompendium.org/index.htm (Europe and North America)


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to