Grouping perl foreach values

Michael Still mikal at stillhq.com
Tue Jul 9 11:09:04 EST 2002


Hey,

I've surfed and can't find anything on this, although that it probably
because I don't know the perl word for it.

I have a list of value in the form:

  v1;v2;v3;v4;v5;v6;v7;v8;v9

And I want to work through them in sets of three, something like:

foreach($cola, $colb, $colc) ($listofthings){
  ... do stuff ...
}

Can people either suggest how to do this, or suggest how I can refactor
the problem to make this easier?

Thanks,
Mikal

-- 

Michael Still (mikal at stillhq.com)     UMT+10hrs





More information about the linux mailing list