On Thu, Jul 10, 2003 at 12:26:59PM -0400, Jamie Risk wrote:
> It's been my experience that readers of this group relish a 
> demonstration of their persnicketiness.  For this I give the
> following; it works, but doesn't appeal to me:
>
>    my @tmp_list;
>    my @list;
>    my $description;
>    push @tmp_list, split(/\t/,$_,6);
>    push @list, $tmp_list[0], $tmp_list[1], 
>                $tmp_list[2], $tmp_list[3], $tmp_list[5];
>    $description = $tmp_list[4];

CHOOSE ONE (untested).

     #
     # list slice (v. ugly)
     #
     my ($desc, @list) = (split /\t/, $_, 6)[4,0..3,5];

     #
     # splice
     #
     my @list = split (/\t/, $_, 6);
     my $desc = splice(@list, 4, 1);

-- 
Steve

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

Reply via email to