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

Re: [MacPerl] setting perl directory & date



Wise Earth <webmaster@wiseearth.com> writes:
}I'm a newbie to Perl and I'm currrently trying to convert Perl scripts from
}UNIX to Mac running Web*. Three questions:
}
}1.	If the perl address on UNIX is
}	#!/usr/local/bin/perl
}	what would be the comparabe address for my Mac server?

Indulge yourself.  MacPerl doesn't care; I think the only restriction is
that it has to have "perl" in it.  I generally use #!perl in my MacPerl
only scripts, and #!/usr/local/bin/perl on my cross platform scripts.

}2.	If the date address in the script on UNIX is
}	$datecom = `/bin/date`;
}	$date = `$datecom +"%r on %A, %B, %d, %Y, %Z`; chop($date);
}	what would be the comparable info on my Mac server?

Start up Shuck and look up "localtime".

}3.	If the perl address on UNIX is
}	$mailprog = `/usr/sbin/sendmail`;
}	what would be the comparable info on my Mac server?

There is nothing comparible.  Use Net::SMTP, part of the libnet package.

Generally speaking, things that you do with external programs on Unix you
either do entirely in Perl on a Mac (the easiest way by far), or try to
script a Mac program using MacPerl::DoAppleScript or by using the Apple
Events interface.  There is no simple way to convert from Unix scripts that
use external Unix programs.

}
}
}=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
} Wise Earth		888-883-8860 TollFree
} www.WiseEarth.com	webmaster@WiseEarth.com
}=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
}
}         web hosting - virtual domains - virtual servers
}
}
}
}
}
}
}
}***** Want to unsubscribe from this list?
}***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch


---
Paul J. Schinder
NASA Goddard Space Flight Center
Code 693, Greenbelt, MD 20771
schinder@pjstoaster.pg.md.us



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