Re: Slicing and dicing

2001-06-14 Thread Paul
--- David Gilden <[EMAIL PROTECTED]> wrote: > Is one style better then the other here? > > sub print_table_rows { > my $name = shift; > my $key = shift; > my $date = shift; > --- alt > sub print_table_rows { > my ($name,$key,$date) = @_[0..2] I'd just say my ($name,$key,$date) = @_;

Re: Slicing and dicing

2001-06-14 Thread Jeff 'japhy' Pinyan
On Jun 14, David Gilden said: >my ($name,$key,$date) = @_[0..2] You needn't even use an explicit slice. my ($name, $key, $date) = @_; works fine here, and is generally preferred over large amounts of shift()s. If you do need to be destructive to @_, then you might want to splice() it, inste

Slicing and dicing

2001-06-14 Thread David Gilden
Is one style better then the other here? Thanks, Dave - sub print_table_rows { my $name = shift; my $key = shift; my $date = shift; print < $thread{$key} $name$date data --- alt sub print_table_rows { my ($name,$key,$date) = @_[0..2] print < $thread{$key} $name$date data