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



Reply via email to