wait! how does this grep trickery work? where's the circuitry?

On Thu, 3 Jan 2002, Jeff 'japhy' Pinyan wrote:

> On Jan 3, Busse, Rich said:
> 
> >("Abiosdsk", "Afd", "", "", "", "Aha154x", "Aha174x", "aic78xx", "",
> >"Alerter", "", "", "", "Always", ...)
> >
> >Is there a simple way to get rid of the empty strings and compress the list
> >down to:
> >
> >("Abiosdsk", "Afd", "Aha154x", "Aha174x", "aic78xx", "Alerter", "Always",
> >....)
> 
> I'd use grep():
> 
>   @compressed = grep length, @array;
> 
> That only allows elements with a non-zero length to get through.
> 
> 


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

Reply via email to