Hello all, if you like me often run scripts developed to expect command line options you might make use of the following sample script:
#!/usr/bin/perl -w use strict; # script to switch between BBEdit and MacPerl and back # the purpose is to use a modal MacPerl::Ask() from BBEdit # which otherwise would involve manually bringing Macperl to front # I use it here to enter @ARGV with MacPerl::Ask # the results from a script are ouput in BBEdit # # Author: Axel Rose, December 2001 # inspired by the helpful team of Bare Bones, John Gruber use Mac::Processes; use Mac::Events; my $bbedit = GetFrontProcess; my $macperl = GetCurrentProcess; SetFrontProcess $macperl; WaitNextEvent; @ARGV = split / +/, MacPerl::Ask("Please enter command line options"); SetFrontProcess $bbedit; WaitNextEvent; my $script = ":examples:Getopt-Declare-test.pl"; require $script; __END__ It should run in other editors as well. Just change $script to whatever Perl script you want to call from the editor. Axel -- ---------------------------------------------------------------------- Axel Rose, Springer & Jacoby Digital GmbH & Co. KG, mailto:[EMAIL PROTECTED] pub PGP key 1024/A21CB825 E0E4 BC69 E001 96E9 2EFD 86CA 9CA1 AAC5 "If this be error, and upon me proved, I never writ."