The following is typical of what I would write that would work as a droplet
in MacPerl but that seems to silently fail as a DropScript application. I'm
I misunderstanding what DropScript does? Surely I have some things to learn
about working with Perl in OS X. If any one can point me in the right
direction and or rewrite the following examples to work in DropScript, it
would be greatly appreciated. Thanks.

(email may change line breaks...)
first example:

#!user/bin/perl
foreach $file (@ARGV) {
    my $newname = $file;
    $newname =~ tr/A-Z/a-z/;
    # change $newname
    rename($file, $newname) or  
        warn "Couldn't rename $file to $newname: $!\n";
}

second example:

#!user/bin/perl -w
@files_dropped = @ARGV;
for (@files_dropped){
$_ =~ s!(.+):([^:]+)!$1:!;
opendir(DIR,$_);#look in the directory of those dropped files
@contents_each_dir = readdir(DIR);
for (@contents_each_dir){
print "$_\n";
}
}


> ----------
> From:         Pete Prodoehl
> Reply To:     [EMAIL PROTECTED]
> Sent:         Thursday, October 31, 2002 9:55 AM
> To:   [EMAIL PROTECTED]
> Subject:      Re: How do you install modules in OS X?
> 
> 
> For creating droplets similar to how MacPerl did it, I use DropScript:
> 
>      http://www.mit.edu/people/wsanchez/software/
> 
> 
> 
> Pete
> 
> Vic Norton wrote:
> > Hello all,
> > 
> [snip]
> >  (A future question: How do you make droplets in OS X?)
> [snip]
> > 
> > Regards,
> > 
> > Vic
> > 
> 
> 

Reply via email to