> >> > I'd probably do:
> >> > my ($max, $sep, $end) = @_;
> >>
> >> Yes, becuase if you did it this way you'd get $end equal
> >> to the integer coult of the number of list arguments passed
> >> plus one for the end value.
> >
> > Huh? $end gets assigned $_[2]. I'm not sure where you get an "integer
> > coult" from.
> 
> Look up what happens to arrays in a scalar context.
> 
> Or try in the debugger:
> 
> my ( $a, $b, $c ) = qw( foo bar bletch blort bim bam blort );
> 
> what do yo get for $c?

Not what you expected... a slight change avoids this:

my ( $a, $b, $c, undef) = qw( foo bar bletch blort bim bam blort );

Jonathan Paton

=====
s''! v+v+v+v+  J r e P    h+h+h+h+ !s`\x21`~`g,s`^ . | ~.*``mg,$v=q.
 P ! v-v-v-v-  u l r e r  h-h-h-   !12.,@.=m`.`g;do{$.=$2.$1,$.=~s`h
 E !   v+v+v+  s     k e  h+h+     !`2`x,$.=~s`v`31`,print$.[$v+=$.]
 R !     v-v-  t H a c h  h-       !}while/([hv])([+-])/g;print"\xA"
 L !             A n o t           !';$..=$1while/([^!]*)$/mg;eval$.

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

Reply via email to