On 12/16/2010 01:20 AM, Omer Zak wrote: > On Thu, 2010-12-16 at 00:32 -0500, Assaf Gordon wrote: >> Interestingly, before this was a perl script, it was a bash >> script. in bash, the following just works: >> > [...] I am curious to know why one must go to all this trouble just > to implement the wrapper script in Perl rather than in bash. >
After adding options like "help", "version", "examples", and input validation, and debug messages, etc. - The bash script become a little bit more than just a two-liner. It was still all fine, except for one headache: Parsing and passing the optional "-t SEP" parameter to "sort". This is the field separator character, which can be a single space or a single tab (or any other single character). Getting it to work inside a shell script became a quoting mess. There's probably a way to do it, I just couldn't figure it out. Coupled with another wrapper (for 'join'), it was just easier to switch to perl, where I can use system(@LIST) and pass parameters exactly as I want then, without worrying about quoting rules. -assaf _______________________________________________ Perl mailing list [email protected] http://mail.perl.org.il/mailman/listinfo/perl
