#!/usr/bin/perl -w use vars qw($a $b); sub myreduce(&@) { my $sub = shift; $a = shift; foreach $b (@_) { $a = $sub->(); } $a; } print myreduce{ eval "$a + $b" } 1,2,3;
In reply to Re: An anomaly with List::Util::reduce and/or eval?
by sgifford
in thread An anomaly with List::Util::reduce and/or eval?
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |