>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 Probably the best way to get deterministic results would be to specify that your ordering is by icon location in icon view--or sorted order in list view--and do the sorting yourself. You can get the icon locations from the Finder information, for icon view, and--how you choose--deal with icons which are in "odd" positions (is an icon which is three pixels below the row it appears to be in in that row, or in the next row?). I believe the software which built pipes of little filter apps in a folder did it that way (with a restriction that the icons should be on the Finder's grid). Clearly, sorting according to the current list view is easier. Anyhow...sort ARGV and then use it. Depending on the Finder is depending on software which is probably deterministic but certainly tries to hide that fact. There's an opportunity here for a contributed module, probably. --John -- John Baxter jwblist@olympus.net Port Ludlow, WA, USA Give a man a fish and you feed him for a day. Teach him to fish, and you get rid of him for the weekend. ***** Want to unsubscribe from this list? ***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch