bruce-

thanks for the response. i am dropping multiple files, but only one 
is being written to the log file. the problem is that i don't know 
how to access the list of arguments that is passed to the shell by 
the droplet (or how to pass that directly to perl). $* would work in 
a shell script, but i don't know how to get at that from perl.

no errors are generated by the script below when i run it from the droplet.


--josh
>At 4:25 PM -0600 12/1/01, Joshua Kaufman wrote:
>>Thanks for the help. Now I can see the errors that the script is 
>>generating, but I'm still not sure how to access argv from my perl 
>>script. For example, if I want to assign the contents of argv to 
>>@some_array how do I do that?
>>
>>Tantalizingly, if i just write:
>><code>
>>#!/usr/bin/perl -w
>>
>>use strict;
>>
>>open LOG, ">log.txt" or die "can't open the logfile $!";
>>
>>
>>foreach my $file (@ARGV) {
>>print  LOG "$file\n";
>>}
>></code>
>>
>>then I get (just) one of the files, but this leads me to believe 
>>that I don't need to create my own array. Any help is appreciated.
>>
>
>@ARGV _is_ an array, and it can be copied to another array:
>
>@some_array = @ARGV;
>
>Just to check: are you dropping multiple files on the droplet in one 
>'drop', or are you dropping each file one at a time?
>
>If the latter, study the open() command; as written, each time your 
>script is called, it writes over what was already there.
>
>Otherwise, what are the errors you see? Maybe there's a hint there.
>
>HTH
>
>1;
>--
>
>   - Bruce
>
>__bruce_van_allen__santa_cruz_ca__


-- 

Reply via email to