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

[MacPerl] what about "system()" and backticks?




I haven't checked the mac-perl mail list archive -- it seems the link from the 
MacPerl faq (www.binary.net/dturley/macperl/search.html) has died off.

I wrote a command-line-oriented C program that works on wintel and unix -- a 
basic file-filter for converting a specialized audio file format (involving a 
specialized form of audio compression) to the more widely accessible "riff" 
(aka "wav") format (without compression).  The CLI is pretty simple, just  
input and output file names, plus a couple of option flags.

I'm not a mac programmer or user, so a very concientious mac person has given 
me valuable help in porting this application to macs; but we both recognize 
that there is a problem.  Sometimes, users may be confronted with literally 
thousands of files that need conversion (e.g. on a set of cdroms that I send 
them), and it's just not possible to do this manually, one file at a time.  
(Doing it manually just one directory at a time would not be much better.)  On 
wintel/unix, it's no problem -- a simple perl script will do all the files you 
want, and you just need to start it once to do it all.  But with a mac... ?

My mac friend says it will take him a long time to get a decent solution using 
just C to add the right kind of interface to my program, and he probably won't 
have that much time to work on it.  (He did provide a compromise, doing a 
directory at a time, but...)

I think MacPerl could make this pretty simple (I could do it myself!) -- IF 
it's possible to invoke this C program from a MacPerl script, or somehow make 
the C code runnable as an extension to the script.  The "current"(?) FAQ page 
(July, 1999) says nothing about "system()", and not much about backticks (and 
it's not encouraging).

I don't mind having a mac version of the app that's a completely different set 
of code from the wintel/unix app -- just so long as I can maintain it and get 
the same functionality on all three platforms (and I don't require 
non-programmer mac users to install MPW on their machines).

Does anyone have relevant examples they could share, or helpful advice or 
pointers to better detail than the faq?  (Or, if anyone has suggestions about 
an appropriate way to "think different"... (;^)  -- Well, of course I have 
thought about making the cdroms with wav files in the first place, but really, 
I'm afraid this is not an option.)

Thanks,
	Dave Graff



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