[lug] perl question
Paul Walmsley
shag-blug at booyaka.com
Sat Apr 27 15:12:00 MDT 2002
On Sat, 27 Apr 2002, j davis wrote:
> $array[0] = Dr. Stephen Abel
> 5 Ellen Court
> Orinda, CA 94563
> Deanmail#
>
> $array[1] = William J (Jr.) Abraham
> 11137 E Mariola Way
> Scottsdale, AZ
> 85262-3203
> furlow#
>
> and so on... this happens because of some split stuff i did in the script
> that put the list in its current format. Im ok with this...
> i just want to know how i can get each line from say..$array[0]
> into another array so each line is a diffrent var..like
>
> $newarray[o] = William (jr) abrham
> $newarray[1] = 11137 e Mariola way
consider splitting on a newline, e.g.,
my @lines = split (/\n/, $array[0]);
- Paul
More information about the LUG
mailing list