On March 22, 2003 01:07 am, Robert Canary wrote:
> I am trying figure out how do comb through a $variable that has multiple
> "\n" and each line has various number of characters, and white spaces.
> A for loop won't work, it keeps capturing individual words, I need to
> capture whole lines.

i'm having trouble understanding exactly what you're looking for, but for my 
best guess, i'd suggest the following:


my @lines = split("\n", $paragraph);

for (my $i = 0; $i <= scalar(@lines) - 1; $i++) {
        echo "$line[$i]\n";
}


-- 
if we teach our children by example,
we only have ourselves to blame for what they become
  - unknown



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to