From: "Brett W. McCoy" <[EMAIL PROTECTED]>
> On Thu, 8 Nov 2001, Jerry Preston wrote:
>
> > I am looking for a PERL / better way of writing this:
> >
> > foreach my $t ( @{ $T_OWNER_INFO{ $owner }} ) {
> > $items[ $j++ ] = $t;
> > }
> > $name = $items[ 0 ];
> > $phone = $items[ 1 ];
> > $pager = $items[ 2 ];
> > $email = $items[ 3 ];
>
> my ($name, $phone, $pager, $email) = @{ $T_OWNER_INFO{$owner} };
>
> -- Brett
Or ... if the $j was not 0 (or undefined) before this code:
my ($name, $phone, $pager, $email)
= @{ $T_OWNER_INFO{$owner} }[$j..$j+3];
Jenda
=========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==========
There is a reason for living. There must be. I've seen it somewhere.
It's just that in the mess on my table ... and in my brain.
I can't find it.
--- me
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]