Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: Closures clarification

by fenLisesi (Priest)
on Dec 04, 2007 at 14:11 UTC ( #654796=note: print w/ replies, xml ) Need Help??


in reply to Re: Closures clarification
in thread Closures clarification

And what else is he missing?

use File::Find; my $total_size = 0; find({sub $total_size += -s if -f}, '.'); print $total_size, "\n";
You were missing the "use" statement and a "(" in the find function.


Comment on Re^2: Closures clarification
Download Code
Replies are listed 'Best First'.
Re^3: Closures clarification
by memnoch (Scribe) on Dec 04, 2007 at 16:35 UTC
    Thanks fenLisesi....I missed that other typo...I have fixed it in my original posting as well.

    memnoch

    Gloria in Excelsis Deo!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (9)
As of 2015-07-30 10:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (271 votes), past polls