Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: Open a directory and recursively process files

by BrowserUk (Pope)
on Jan 09, 2013 at 12:38 UTC ( #1012469=note: print w/ replies, xml ) Need Help??

in reply to Reaped: Open a directory and recursively process files

Neither, it is my $line = @_; that is the problem. An array assigned to a scalar gives the number of elements in the array.

What you should do is either the assignment you weren't sure about (but aren't actually using):my $line = $_[0];

Or, a list assignment: my( $line ) = @_;

Or, use shift:my $line = shift;

You should also drop the & from your subroutine calls. Ie. &process_file ($file); should be process_file( $file );

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Comment on Re: Open a directory and recursively process files
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2015-11-28 18:28 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (743 votes), past polls