Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Eliminating "used only once" warnings from List::Util::reduce

by Khen1950fx (Canon)
on Jul 30, 2013 at 06:46 UTC ( [id://1046955]=note: print w/replies, xml ) Need Help??


in reply to Eliminating "used only once" warnings from List::Util::reduce

This is the type of bug that makes Perl enormously interesting for me. Here's my last attempt:
#!/usr/bin/perl -l use strict; use warnings; use List::Util qw/reduce/; our($a, $b) = @_; my $reduce = reduce { $a + $b; } 1, 2, 3, 4; print $reduce;

Replies are listed 'Best First'.
Re^2: Eliminating "used only once" warnings from List::Util::reduce
by davido (Cardinal) on Jul 30, 2013 at 18:45 UTC

    Slick, however the point of the question was missed. If I wanted to solve it in "user code", there are at least a half dozen ways to do it. The question is dealing with how to solve it in either the module's code or perl code.


    Dave

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1046955]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (1)
As of 2024-04-26 02:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found