Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

RE: RE: Subroutine question

by BlaisePascal (Monk)
on Sep 18, 2000 at 22:14 UTC ( [id://32998]=note: print w/replies, xml ) Need Help??


in reply to RE: Subroutine question
in thread Subroutine question

I think that's what he's trying to do, but he's also modifying the global @array1, and he wants to modify the global @array2 the second time around.

Personally, I'd consider that poor style, and rewrite it as...

@array1 = file_processing($script,$arg1,$file1); @array2 = file_proceesing($script,$arg2,$file2); ... sub file_processing { my ($script,$arg,$file) = @_; my @results; ... return @results; }
Actually, I wouldn't... I'd call the sub "processfile", and make several other tweaks if I was writing this myself, but that's just me.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2024-04-25 14:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found