home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / perl / 7498 < prev    next >
Encoding:
Internet Message Format  |  1992-12-18  |  1.1 KB

  1. Path: sparky!uunet!nestroy.wu-wien.ac.at!dec4.wu-wien.ac.at!neumann
  2. From: neumann@dec4.wu-wien.ac.at (Gustaf Neumann)
  3. Newsgroups: comp.lang.perl
  4. Subject: Re: In 5.0, are we gonna get...
  5. Date: Thu, 17 Dec 92 22:47:15 MET
  6. Organization: WU-Wien
  7. Lines: 23
  8. Distribution: world
  9. Message-ID: <7246288358-314904@dec4.wu-wien.ac.at>
  10. References: <1992Dec14.043835.23009@reed.edu> <1992Dec14.192007.7534@wdl.loral.com> <2B2D2498.874E@tct.com>
  11. NNTP-Posting-Host: dec4.wu-wien.ac.at
  12.  
  13. In article <2B2D2498.874E@tct.com> from [Tue, 15 Dec 1992 00:19:36 GMT] you wrote:
  14.  |> >    $sum = reduce {$a+$b} 1,34,$x,45,-8,0.1;
  15.  |> 
  16.  |> Interesting.  That operation would be a generalization of join:
  17.  |> 
  18.  |>     $x = join(":", @foo);
  19.  |> 
  20.  |> and
  21.  |> 
  22.  |>         $x = reduce {$a.":".$b} @foo;
  23.  
  24. how about 
  25.  
  26.         $sum = eval join('+ ',1,34,$x,45,-8,0.1);
  27.  
  28. ok, the string conversion could be avoided, but you can do it now...
  29. -gustaf
  30. --
  31. Gustaf Neumann          neumann@dec4.wu-wien.ac.at, neumann@awiwuw11.bitnet
  32. Vienna University of Economics and Business Administration 
  33. Augasse 2-6,  A-1090 Vienna, Austria        
  34. Tel: +43 (222) 31-336 x4533      Fax: 347-555
  35.  
  36.