in reply to Lots and lots of arguments!
xargs will normalize the whitespace that separates strings in its input, so whether its 50 strings on one line or 50 lines with one string per line, or anything in between with 50 strings, your script's ARGV will have 50 elements.cat file_with_many_args.txt | xargs your_perl_script # or process_that_spews_args | xargs your_perl_script
Also, if you have the liberty of enhancing the usage syntax for your script, you might consider adding single option that allows for a large set of args to be read from a given file (e.g. your_perl_script -a arg_list.file
|
|---|