[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] order of args in @ARGV?



Under Unix, of course, the args in @ARGV are read in the order in which
they were placed on the command line.

I shall (without testing) presume that MPW works this way too (if it
doesn't, it should :-)

But MacOS has no command line.  I would have expected files dropped onto a
MacPerl droplet to go into @ARGV in alphabetical sort order.  But they
don't... they appear to go into @ARGV in the order in which they were named
(or, in which their names were changed).  Is this access time?

Is this coincidental (it just happened that way) or is there a reason I
should be documenting for the FAQ oir a future version of the book?  i.e.
why is this the ordering scheme?

inquiring minds and all that -

Vicki

(p.s. this was discovered under MacOS 8.1 and macPerl 5.2.0r4, when testing
out "command line switches" implemented as files (or folders) named, e.g.
"-a", "-b", and so on. The behaviour was not as I had expected... although
- sorts lower than alphabetics, in my first test, my "flag" files were
later in @ARGV than my "data" file!)
---
Vicki Brown, vlb@cfcl.com        |\      _,,,---,,_
Journeyman Sourceror      ZZZzz /,`.-'`'    -.  ;-;;,_
Scripts & Philtres             |,4-  ) )-,_. ,\ (  `'-'
http://www.cfcl.com/~vlb      '---''(_/--'  `-'\_)
P.O. Box 1269 San Bruno, CA  94066

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch