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

[MacPerl] Cross-platform solution?



Folks,

Has anyone found the golden pe(a)rl in terms of file locking and smpt
mailing that will *work* for all major platforms, i.e. Unix, NT(IIS),
Windows/DOS and MacOS? I'm programming for Unix on a local Mac which
generously ignores any Unix sendmail routines but understandably blocks
on the flock command.  

So far I've written a simple construct to handle Unix and, admittedly
more as a guess, Windows Mail:

if ($OS eq "UNIX") {
	$mail_program = "/usr/lib/sendmail -t -n";
	&PROCESS_MAIL($sender,$to, $subject, $body);
} elsif ($OS eq "WINDOWS") {
	$mail_program = "c:/path/dir/blat/blat.exe";
	???...
	&SEND_MAIL($mailprog, $subject, $to, $sender, $body);
} elsif ($OS eq "MAC") {
	???...
}

And how about a simple yet secure way to lock files on Mac/Windows
besides the Unix flock?

Any hints are greatly appreciated!

Philippe Wiede
mailto:pwiede@virtuoso-net.com

.............................................................................
Join Virtuoso-Net (r), the global contract network for communication and
programming professionals: http://www.virtuoso-net.com/openings.html
.............................................................................

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch