Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: Name "main::a" used only once: possible typo

by LanX (Chancellor)
on Mar 11, 2013 at 13:40 UTC ( #1022797=note: print w/replies, xml ) Need Help??


in reply to Re: Name "main::a" used only once: possible typo
in thread Name "main::a" used only once: possible typo

cause it doesn't work?

use List::Util qw/reduce/; print reduce { $_[0] * $_[1] } 1..6; __END__ Use of uninitialized value in multiplication (*) at /home/lanx/B/PL/PM +/ScopeListUtils.pl line 23. ...

Cheers Rolf

Replies are listed 'Best First'.
Re^3: Name "main::a" used only once: possible typo
by mithaldu (Monk) on Mar 11, 2013 at 17:48 UTC
    Well damn. I was sure i had used that on List::Util stuff to get around $a/b warnings. Guess i misremembered.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1022797]
help
Chatterbox?
[Lady_Aleena]: Renaming things like get_THAC0 to just THAC0 was easy. These are harder.
[james28909]: consolidate the three subs into one
[Lady_Aleena]: Um, what?
[james28909]: check is is data or hash or array and do tasks then return needed data
[Lady_Aleena]: james28909, you might want to look at the other two on my scratchpad.
[james28909]: after you send to a sub, you can check if it is array or ref ect with ref

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2017-05-24 04:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?