On Thu, Mar 12, 2009 at 09:27:54AM -0400, Wayne Brissette wrote:
> Anyhow, I'm playing around with reading in some static files in perl, what
> I've discovered is that if put the script in the same directory as the text
> file, it works properly. However, if I try to provide a path like:
> ~/Documents/log_files/
>
> The script can't open the file. is there a trick in Mac OS X to do this that
> is outside the perl norm?
Using ~ as a shortcut for your home directory is a shell-ism, perl
doesn't handle it. Replace it with $ENV{HOME}, or if you want your code
to be portable to non-Unix platforms, use the File::Homedir module.
--
David Cantrell | A machine for turning tea into grumpiness
fdisk format reinstall, doo-dah, doo-dah;
fdisk format reinstall, it's the Windows way