That is something like what I just did..

&store_header($paragraph);

sub store_header 
{
 my ($paragraph) [EMAIL PROTECTED];
 my (@paragraph) = split("\n", $paragraph);
 
 while (pop @paragraph)
 {
   $global_header_list .= if /^dn/
 }

The hang up a had (other than brain dead after 12 hours) was trying to
feed through the variable.  A "foreach" locked onto each word, a "while"
went into an infinet loop.  The pop did the trick....

Thanks


gabriel wrote:
> 
> 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



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

Reply via email to