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

Re: [MacPerl] order of args in @ARGV?



At 5:38 PM -0800 11/2/98, Vicki Brown wrote:

} 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?

No, I believe that usually it's however they're ordered in the Finder (by
name, by date, etc.).  There is a way to get them in @ARGV in the way that
they're selected, but I've forgotten the exact procedure (maybe it's that
way if they're selected in full iconic view, but I'd have to test to make
sure.)

}
} 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
}



-----
Paul J. Schinder
schinder@pobox.com

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