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

Re: Lots and lots of arguments! (inefficient?!)

by tye (Sage)
on Dec 11, 2014 at 17:38 UTC ( [id://1110077]=note: print w/replies, xml ) Need Help??


in reply to Lots and lots of arguments!

I have a problem whereby my perl program might need to accept a lot of arguments [...] less than a hundred [...] But is there a more efficient way of slurping the arguments into my perl program?

The efficiency of passing 100 command-line arguments to a program is not something to be concerned about. Heck, command-line arguments are probably one of the most efficient ways to get data into a program (not that most of the other ways of getting 100 arguments to a program are inefficient enough to worry about either).

Perhaps you could better explain what problem you fear will result and how uuencode or pack might help?

BTW, if you use list-mode system (on a Unix-like operating system), then the only thing you have to worry about with command-line arguments are '\0' characters or perhaps the total length of the arguments adding up to more than some kernel constant (though I was not able to reproduce that old problem on my rather old but not ancient Unix system -- though 100 arguments isn't even close to that limit even on ancient kernels unless each argument is ridiculously long).

- tye        

  • Comment on Re: Lots and lots of arguments! (inefficient?!)

Replies are listed 'Best First'.
Re^2: Lots and lots of arguments! (inefficient?!)
by karlgoethebier (Abbot) on Dec 11, 2014 at 19:20 UTC
    "...Perhaps you could better explain..."

    :-)

    «The Crux of the Biscuit is the Apostrophe»

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (4)
As of 2024-04-25 13:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found