Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Counter in foreach loop

by Bloodnok (Vicar)
on Dec 06, 2009 at 00:54 UTC ( #811290=note: print w/replies, xml ) Need Help??


in reply to Counter in foreach loop

On a point of pedantry &/or etiquette, may I be the first to point out that your code should've been enclosed in <c> ... </c> tags (as it says in emboldened font just below the text box used to enter your posting) - the use of those tags causes the code to be rendered clearly (c/w the line noise in your post) as ably demonstrated by the code blocks in the posts of previous 2, and most other, monks.

Update:

Thanx to AnomalousMonk for spotting out the deliberate, now corrected mistake wrt the closing tag.

A user level that continues to overstate my experience :-))

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://811290]
help
Chatterbox?
[Lady_Aleena]: File::Find doesn't have a simple sub wanted example, like get the name of the file.
[Discipulus]: there is also find2perl with your perl installation
[Discipulus]: and in the wanted sub you just calculate the duretion and add it the total, stop
[shmem]: sub wanted { push @files, $File::Find::name if $File::Find::name =~/\.mp3$/ }
[Lady_Aleena]: shmem, that is understandable! The two examples in File::Find don't make sense to me on a quick glance.
[marioroy]: LA if the find worked from Unix command line, or does it not. Likely a quoting issue inside Perl qx.

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (12)
As of 2017-04-23 20:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (432 votes). Check out past polls.