[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] droplet



On 10/1/99 at 2:35 PM, Simon Martel wrote:

: 
: : Hi!
: : 
: : I am new to programming and english isn't my native langage. I learn
: : programming with MacPerl and some JavaScript. I want to make a droplet
: : to clean some html files. My question is : What is the way to tell the
: : droplet it should read the file i drop on it. I already have the book
: : "MacPerl, Power and Ease".
: : 
: : Thanks ! :-).
: : 
: : # ===== Want to unsubscribe from this list?
: : # ===== Send mail with body "unsubscribe" to macperl-request@macperl.org
: : 
: : 
: 
: Inside the droplet, all of the names of the files you drop are in the @ARGV 
: array. 
: So in your code, you do this:
: 
: foreach $file (@ARGV) {
: 
:     # do something with the file
:     open F, $file or die;
:     
:     while (<F>) {
:     
:     }
: }
: 
: 
: Don



# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org