>>>>> "TC" == Tom Christiansen <[EMAIL PROTECTED]> writes:

  TC> It just kinda irks me here:

  TC>     $total += 2 * do {
  TC>   my $count = 0;
  TC>   for $n (@nums) { $count += $n }
  TC>   $count;
  TC>     };

  TC> I rather that were:

  TC>     $total += 2 * do {
  TC>   my $count = 0;
  TC>   for $n (@nums) { $count += $n }
  TC>   return $count;
  TC>     };

hmm, why not consider a do block to be an inline sub with no name or
arguments and it executes immediately. then it has all the semantics of
return so you don't need last. it can return the last expression or use
a return statement. you could support next and redo without any major
hacking IMO.

uri

-- 
Uri Guttman  ---------  [EMAIL PROTECTED]  ----------  http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page  -----------  http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net  ----------  http://www.northernlight.com

Reply via email to