On Tue, 1 Oct 2002, Faymon, Kurt wrote:

> 
> Simple for some (most), perplexing me:
> 
> have a variable, say $Record which contains many lines (actually codes),
> like:
> 
> <p>
> <h>
> <link>
> <ref>
> So on....
> 
> How can I roll through the value of the variable, capturing each line and
> pushing it onto an array?

Let me see if I got your question right, you have a scalar variable that 
contains a string with embedded newlines (is this what you mean by many 
lines?). You want the individual lines in an array. If so,

my @indiv_lines = split ("$/", $Record);
# $/ contains the input record separator, perldoc perlvar

> 
> Kind like reading entries in a cfg file (one on each line) and putting them
> in array?
> 
> thanks
> 
> kf
> 
> 
> 


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

Reply via email to