On Sun, May 05, 2002 at 11:37:20AM -0700, John West wrote:
> The environment here is to complex and relies on
> proprietary vendor tools which I can't send, so here's
> a chunk. I'm trying to figure out if the second
> foreach is really required in the code below -
> preferably there is a way to do this with a single
> foreach statement?
Did you try it? You are right, the second foreach is totally redundant.
> foreach my $item ( @$cfgs )
> {
> foreach my $inner ( $item )
> {
> print "$inner->{'dir'} : $inner->{'tpl'} : $inner->{'ext'} :
>$inner->{'rgx'}\n";
> }
The only effect the second loop has is to rename $item to $inner. Get
rid of it, and change $inner to $item in your print statement.
> }
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]