use open ':utf8' - garbles file names

2006-08-17 Thread Richard Cook
Perl v. 5.8.6, OS X 10.4.7: #!/usr/bin/perl -w BEGIN { $^W = 1 } use strict; # use open ':utf8'; my $of = index.txt; open OF, $of or die cannot create `$of': $!; opendir(DIR, '.') or die 'cannot open : $!'; my @file = readdir(DIR); closedir(DIR); for my $file (sort @file) {

Re: Suggestions to better ship Perl on OS X.

2005-02-17 Thread Richard Cook
On Feb 17, 2005, at 5:57 AM, Sherm Pendley wrote: On Feb 17, 2005, at 8:31 AM, Richard Cook wrote: Going through old list mail and found this one ... don't know if it's still relevant, but ... I have identical OS X 10.3.8 installs on two different machines ... identical that is except one has

XML::Parser

2004-01-23 Thread Richard Cook
Can anyone here offer step-by-step for installing XML::Parser ? I've run into trouble with the expat-1.95.7 install ... and think I should revert to 1.95.6. I'd like to do a clean install of expat and XML::Parser, without doing a clean install of OS 10.2.8 ... -Richard

Re: Breaking up a long string...

2003-12-29 Thread Richard Cook
On Monday, Dec 29, 2003, at 13:28 US/Pacific, Andy Lester wrote: Premature optimization is the root of all evil. Unnecessary optimization is, by definition, premature. Incorrectly anticipating future necessary optimization is the root of all evil.

Re: head

2003-11-23 Thread Richard Cook
On Sunday, Nov 23, 2003, at 12:04 US/Pacific, Jerry Rocteur wrote: A UNIX system that is not case sensitive doesn't sound like a UNIX system to me.. I wonder what else Apple is going to change in UNIX, soon we'll be cd \etc\httpd It seems to me that there's no good reason to preserve case

Fwd: $^E bug and perl 5.8.0

2003-11-19 Thread Richard Cook
Begin forwarded message: (For the porters: the bug is that this: % perl -le '$^E = -1728; print $^E+0 for 0,1' Should return this: -1728 -1728 But in some cases, returns this: -1728 22 Odd.) this is because perl's print writes to stdout, and that usually uses