I always slap a
for ($a=0; $a<@ARGV; $a++) {
$fil = @ARGV[$a];
do some stuff with the files
}
around it just in case there were multiple files/folders dropped on me.
At 19:04 -0400 06/18/2001, Adam Witney wrote:
>The filename of any file dragged onto a droplet is stored in @ARGV, so all
>you need to do is
>
>$filename = $ARGV[0];
>
>open(FILE, $filename) or die $!;
>
>while(<FILE>) {
>
> .....
>
>}
>
>> hi
>> is it possible in macperl to save a basic script as a droplet and when i
>> drag a txt-file over the droplet the file will be read as input,
>> somthing like this (were the droplet itself should detect the file input)
>>
>> open (FILE, <STDIN>) or die $!;
>> while (<FILE>) {
>> s/a/abc/g;
>> print;
>> }
>>
>>
>> thanks
>> allan