Re: Bizarre install behaviour

2008-11-23 Thread Ken Williams
On Sat, Nov 22, 2008 at 11:41 PM, [EMAIL PROTECTED] wrote: The failed test is lib/Module/Build/t/tilde..# Failed test at ../lib/Module/Build/t/tilde.t line 49. # got: '/var/root' # expected: '/Users/robin' This failure is probably

Re: Thanks Apple! You snubbed perl yet again!

2007-10-17 Thread Ken Williams
On Oct 17, 2007, at 10:43 AM, [EMAIL PROTECTED] wrote: On Oct 17, 2007, at 5:25 PM, brian d foy wrote: In article [EMAIL PROTECTED], [EMAIL PROTECTED] wrote: It looks like I will have to stick with debian for developing my LAMP applications. If you want to work on the Mac, you still

Re: File::Path rmtree portability (works on OS X, fails on WinXP)

2007-09-28 Thread Ken Williams
On Sep 28, 2007, at 5:52 PM, Jim wrote: # define build dir path if ($runOS eq win){ $buildDir = .PSF\\builds\\$version; } else { $buildDir = /builds/$version; } # test for dir and remove if it exists if ( -d $buildDir) { # using File::Path here for directory

Re: XML - Attribute/Element names and XML::Simple module

2007-06-13 Thread Ken Williams
On Jun 12, 2007, at 8:50 PM, Jim wrote: I'm having a bear of a time figuring out why XML::Simple seems to want to make both the attribute and child element of a specific element into their own elements. I'm starting to wonder if the XML supplied as input is illegally formatted? There's

Re: CamelBones - Does anyone still care about Jaguar?

2007-04-27 Thread Ken Williams
On Apr 9, 2007, at 3:07 PM, Sherm Pendley wrote: Subject says it all. Would dropping Jaguar support bother anyone? Wouldn't bother me. For most of my modules I try to support 5.6 just because it makes me feel like a nice guy, but for CamelBones I think it's perfectly reasonable to

Re: Interacting with other applications

2007-03-24 Thread Ken Williams
On Mar 23, 2007, at 9:56 AM, David Cantrell wrote: Consider what happens if I'm busily typing away, and the dialogue box pops up and grabs focus, and then whatever its default is gets selected because i hit space or enter. That's exactly what a couple applications do on my machine

Re: Running a PERL script from a PERL CGI

2007-02-07 Thread Ken Williams
On Feb 7, 2007, at 4:33 PM, Philippe de Rochambeau wrote: if (param()) { my $ret = ` perl script_that_retrieves_a_file_by_ftp_and_sends_it_by_email.pl `; Try losing the double quotes. Methinks that long-named script isn't even running. -Ken

Re: Strange problem with @INC

2007-01-09 Thread Ken Williams
On Jan 9, 2007, at 6:25 PM, Jesse Engel wrote: i'm poking through man x to see if i can find something. That's a red herring. As Jay indicated, the only difference between your two environments is that under Terminal.app you've got $PERL5LIB set (to /sw/lib/perl5), but under X11 you

Re: How to know if a module is installed

2006-09-28 Thread Ken Williams
On Sep 27, 2006, at 10:25 AM, David Cantrell wrote: On Thu, Sep 28, 2006 at 12:00:34AM +0900, Nobumi Iyanaga wrote: This is a newbie question: how can I determine if a specific module is installed on a client machine? if(eval use Whatever::Module) { do this; } else { do that; }

Script menu makes perl zombies?

2006-09-08 Thread Ken Williams
Hi, For months I've been trying to figure out what's causing some perl zombie processes on my system. Looks like it might be the script menu. I have a script menu item called tunnels.pl that establishes some SSH tunnels, and it works fine. But after I run it, I see this: % ps

Re: Script menu makes perl zombies?

2006-09-08 Thread Ken Williams
I'm talking about the script menu: http://www.apple.com/applescript/scriptmenu/ Did you run your script from the script menu? -Ken On Sep 8, 2006, at 11:16 AM, Michael Barto wrote: I am not quite sure how you mean to verify this.

Re: iCal modules

2006-08-10 Thread Ken Williams
On Aug 10, 2006, at 4:30 PM, Christian Huldt wrote: sudo find / -name gluemac -print Heh - try this: locate gluemac and see how much faster it is. =) -Ken

Re: anyone know where i can get 10.3 Developers Tools?

2006-07-28 Thread Ken Williams
Wasn't it included in /Applications/Installers/ on 10.3? Or was that just for certain hardware models? -Ken On Jul 28, 2006, at 7:41 AM, Adam Witney wrote: This may be slightly off topic, but I have just bought an iBook off eBay, and it comes with a fresh install of 10.3, however it

Re: convert string to number?

2006-07-10 Thread Ken Williams
On Jul 7, 2006, at 3:18 AM, Adam Witney wrote: then the error goes away, therefore i suspect this is a problem with the internal datatype. I have never worried about this in Perl before, but it appears to be more important now as R is more strict. I'd call this a bug in the RSPerl code,

Re: Mac::Carbon for Intel ... Done?

2006-06-23 Thread Ken Williams
On Jun 19, 2006, at 9:40 PM, Paul McCann wrote: Hi Chris, Go play with it, if you have an Intel Mac. Let me know if you find anything wrong, and let me know soon, since I have less than a week left with this Intel Mac. The module (Mac-Carbon-0.75) was fine through make on my intel

Re: Storable problem on Intel Mac Mini

2006-05-12 Thread Ken Williams
On May 12, 2006, at 6:05 AM, Joel Rees wrote: On 2006.5.12, at 10:01 AM, Mike Schienle wrote: Hi all - I just installed an Intel Mac Mini as a replacement for a dual 1.8 GHz G5 at my colocation place a couple days ago. Can I ask a silly question in public, or would off-list be more

Re: Storable problem on Intel Mac Mini

2006-05-11 Thread Ken Williams
Yeah, any time you use Storable to move data from a big-endian machine to a little-endian machine, or vice versa, you need to use network format, i.e. the nstore() or nstore_fd() functions. The only way I know of to convert the existing files you've got is to find a G5 or another old-world

Re: openning file...

2006-04-02 Thread Ken Williams
On Apr 1, 2006, at 2:49 AM, kurtz le pirate wrote: hello, mac os x store file name in utf-8 format. so, how to open file with special characters in name ? a very simple exemple is a file name that begin with space. if i write : open(FILE, Read in a file), perl return an error: *** can't

Re: flock

2006-02-03 Thread Ken Williams
On Feb 2, 2006, at 5:01 PM, James Reynolds wrote: As I understand it, in C, if I open (create) a file and want to lock it, I should pass in the O_EXLOCK flag at the same time, otherwise, I've got a race condition, another process could potentially lock the file after I've created it, but

Re: Newbie Q about vars sub-routines

2006-01-03 Thread Ken Williams
It's fine if you think it's fine, but it might get difficult to manage in a large codebase. An alternative with more encapsulation would be this: { my $interact = 0; sub interact { $interact } } sub ask { return 1 unless interact(); # otherwise do user-prompt stuff } -Ken On Jan

Re: CPAN modules ...

2006-01-01 Thread Ken Williams
On Dec 31, 2005, at 7:43 PM, John Delacour wrote: At 6:49 pm -0500 31/12/05, Chris Devers wrote: On Sat, 31 Dec 2005, John Delacour wrote: print `/usr/bin/./printenv` ^^ Why the '/./' here? Isn't `/usr/bin/printenv` equivalent, clearer, and simpler? Sure, but I

Re: CPAN modules not included with OS X

2005-12-30 Thread Ken Williams
On Dec 29, 2005, at 7:03 PM, James Reynolds wrote: Grumble. That is exactly what I wanted to know! Thanks! Does CPAN install C libraries to /usr/local/lib or somewhere else? I could search for all new files right after a CPAN install. Anything that gets installed during 'make install'

Re: eval a string with a hash ref?

2005-11-13 Thread Ken Williams
On Nov 13, 2005, at 12:16 AM, Boysenberry Payne wrote: On Nov 12, 2005, at 10:18 PM, Ken Williams wrote: The pretend you have methods instead of subroutines solution is just wishful thinking, Just out of curiosity, why is this wishful thinking? Because he doesn't have methods, he has

Re: eval a string with a hash ref?

2005-11-13 Thread Ken Williams
On Nov 13, 2005, at 1:22 AM, Sherm Pendley wrote: On Nov 12, 2005, at 11:18 PM, Ken Williams wrote: Yeah, I know, but I posted it because I didn't really like the other solutions; while they use better (and more complicated) techniques, they won't actually solve the OP's problem

Re: eval a string with a hash ref?

2005-11-12 Thread Ken Williams
On Nov 12, 2005, at 1:56 AM, James Reynolds wrote: Is there someway to execute this code like this: $subroutine_name = something; # can't change $hashref-{'key'}='value'; # can't change eval $subroutine_name($hashref); # how do I eval this? It doesn't eval. You want: eval

Re: eval a string with a hash ref?

2005-11-12 Thread Ken Williams
On Nov 12, 2005, at 4:12 PM, Randal L. Schwartz wrote: Ken == Ken Williams [EMAIL PROTECTED] writes: Ken You want: Ken eval $subroutine_name(\$hashref); Only if you also want slow and dangerous'. See the other answers in this thread for safer faster solutions. Yeah, I know, but I posted

Re: print 3 up labels

2005-11-10 Thread Ken Williams
On Nov 10, 2005, at 2:46 PM, Jay Savage wrote: On 11/10/05, Joseph Alotta [EMAIL PROTECTED] wrote: Greetings, I want to print Avery 6140 labels with name and address from a mac. Is there a library. If not, does anyone know how to set a font and tab a certain number of inches to print 3

Re: Help Wanted: Testing CamelBones on Intel

2005-10-25 Thread Ken Williams
On Oct 25, 2005, at 12:53 PM, Sherm Pendley wrote: On Oct 15, 2005, at 9:02 PM, Sherm Pendley wrote: What about if I built a universal binary for y'all to try? Done. As the announcement mentions, the recent release of ShuX, as well as the CamelBones framework itself, are built as

Re: Get/set file type/creator in plain Perl?

2005-08-03 Thread Ken Williams
On Aug 3, 2005, at 10:22 AM, Sherm Pendley wrote: On Aug 3, 2005, at 10:35 AM, Iyanaga Nobumi wrote: But now I have it twice, once in /System/Library/Perl/Extras/5.8.6/darwin-thread-multi-2level/, and the other in /Library/Perl/5.8.6/darwin-thread-multi-2level. Does this make some

Re: problems with WWW::Curl, perl 5.8.7, Mac Mini, 10.4.2

2005-07-21 Thread Ken Williams
On Jul 21, 2005, at 11:06 PM, Joel Rees wrote: I installed 5.8.7 on a Mac Mini running 10.4.2 under /usr/local, executables in /usr/local/bin, used .bash_profile to add /usr/local/bin to the front of my path (bleaugh). (Hesitated about installing gpg, but trying to build it gave me a huge

Re: psync backup problems: suggestions?

2005-07-13 Thread Ken Williams
On Jul 13, 2005, at 1:56 PM, Joseph Alotta wrote: Hi Randall, How did you get it to work? I had trouble getting cpan to install File::MacOS and I put it out to the group and nobody offered a way to get it to compile. Look at the first message in this very thread - the one that says

Re: Cat and Dos2unix Command Line Utilities?

2005-07-11 Thread Ken Williams
On Jul 8, 2005, at 9:57 PM, Joseph Alotta wrote: On Jul 8, 2005, at 9:26 PM, Chris Devers wrote: #!/bin/sh perl -pi -e tr/\r//d Hi Chris, I tried to call perl directly. But this does not work at all. Does anyone know why? #!/usr/bin/env perl -pi -e tr/\r//d Because using

Re: psync and MacOSX::File installing with cpan

2005-07-11 Thread Ken Williams
On Jul 8, 2005, at 10:56 PM, Chris Devers wrote: The first failed test is: use MacOSX::File::Catalog; ... my $asked = askgetfileinfo(dummy); $asked eq avbstcLinmed ? ok(1) : ok(0); Dan, it would be helpful if you'd just write lines like this simply as: ok $asked,

Re: building 5.8.7 on 10.4

2005-07-07 Thread Ken Williams
On Jul 7, 2005, at 5:57 AM, Joel Rees wrote: Just accepted all the defaults. sudo make gave one error: [...] cc -L/usr/local/lib -force_flat_namespace -o miniperl \ miniperlmain.o opmini.o libperl.a -ldl -lm -lc ./miniperl -w -Ilib -MExporter -e '?' || make minitest

Re: building 5.8.7 on 10.4

2005-07-07 Thread Ken Williams
On Jul 7, 2005, at 6:04 PM, Joel Rees wrote: Anyway, I should be able to just install it, then? Yeah, it sounds like it - I wasn't familiar with that locale issue, but if Dominic says it's okay then it probably is. If you want more details about the failure, you might be able to run make

Re: How to build 5.4.5 on OS X

2005-07-04 Thread Ken Williams
On Jul 4, 2005, at 2:41 AM, Michael G Schwern wrote: With a hint from Jarkko I got 5.4.5 to build on OS X. Here's how. Do I hear a 5.4.6 in the future, then? ;-) -Ken

Re: [OT?] Dynamically loading Perl into C programs

2005-06-28 Thread Ken Williams
Hi Wren, Probably the first place to look is perldoc perlembed, which describes in general how to embed a perl interpreter in C programs. There's no way that I know of for embedding chunks of perl (e.g. subroutines) in C without embedding the entire perl interpreter too. To do so would

Re: Flat file being Scrambled

2005-06-15 Thread Ken Williams
Hey Mark, I doubt any mortal brain could follow all the various permutations of clients hitting your files and trying to lock them while some other client is doing the same. But here's one way your data could get hosed: one client reads the file in between the time another client opened it

Re: CamelBones on Intel? Maybe not.

2005-06-09 Thread Ken Williams
On Jun 9, 2005, at 4:39 AM, wren argetlahm wrote: --- Edward Moy [EMAIL PROTECTED] wrote: So what is really needed at this point is for the CamelBones community to get together and innovate. Create some killer apps with CamelBones. Get developer excited about this technology. I'll bite.

Re: Frickin' CPAN

2005-06-09 Thread Ken Williams
://cpan.binarycompass.org http://cpan.mirrors.hoobly.com/ http://cpan.mirrors.nks.net/ wget /sw/bin/wget On Jun 8, 2005, at 9:56 PM, Ken Williams wrote: Hi John, The permissions thing is a red herring. Look more closely at the error message. It's trying to run

Re: CamelBones on Intel? Maybe not.

2005-06-08 Thread Ken Williams
On Jun 8, 2005, at 5:53 AM, Sherm Pendley wrote: There's been some discussion on the Perl 5 Porters' list as well, wondering if Apple could set up accounts on a 'net-accessible machine. Such a machine would be helpful to several others besides myself. The latest CB version supports

Re: Frickin' CPAN

2005-06-08 Thread Ken Williams
Hi John, The permissions thing is a red herring. Look more closely at the error message. It's trying to run a program called /usr/bin. Look at your CPAN configuration (o conf in the CPAN shell) to figure out why. -Ken On Jun 8, 2005, at 3:14 PM, John Mercer wrote: Hi all, CPAN is

Re: CamelBones on Intel? Maybe not.

2005-06-06 Thread Ken Williams
Hey Sherm, I have two suggestions. Since I know you to be a very good programmer with a very good knowledge of how things work under OS X, I suggest going straight to Apple and pitching the idea of developing CamelBones for them. It could work out quite well if the arrangement is crafted

Re: BBEdit/Interarchy

2005-06-03 Thread Ken Williams
On Jun 3, 2005, at 7:34 AM, Ken Williams wrote: On Jun 2, 2005, at 10:16 AM, Bill Stephenson wrote: So I guess what I'm asking is if there a way to get either of these apps to upload a file with a new name and rename it after the upload is complete with one click. Obviously, this doesn't

Re: keychain

2005-04-21 Thread Ken Williams
, I don't want them to get spammed. Any suggestions? Joe. On Apr 19, 2005, at 7:47 PM, Ken Williams wrote: Yeah, check out the 'security' command-line program. I use it in conjunction with Module::Release so that I don't have to type my PAUSE password every time I upload something to CPAN

Re: Installing Mac::Carbon / gcc

2005-04-16 Thread Ken Williams
On Apr 16, 2005, at 9:17 AM, Chris Nandor wrote: NB: Under Tiger, gcc 4 is in use, and Mac::Carbon will not build under gcc 4. One therefore also needs to set gcc to 3.3 under Tiger. Anyone who wants to take on this project of getting it to build under gcc 4 would be my own private hero. Wow.

Re: character encoding on file upload name

2005-04-07 Thread Ken Williams
On Apr 7, 2005, at 3:04 PM, John Delacour wrote: You're talking of file names, I suppose. I think you'll find that this is a function of the file system which stores file names in decomposed form, for what reason maybe someone else can tell you. So that the OS can quickly compare filenames in a

Re: GUI for Perl

2005-03-22 Thread Ken Williams
On Mar 21, 2005, at 2:33 PM, john horner wrote: I'm new round here (just bought a new Mac with Mac OS 10.3.5). I want to build perl apps that can have things dropped on them and display alerts and file chooser dialogues. Nobody's mentioned Pashua yet, which I found very interesting. It will

Re: GUI for Perl

2005-03-21 Thread Ken Williams
On Mar 21, 2005, at 9:51 PM, Sherm Pendley wrote: When you build a Perl from source, you specify a prefix. The default prefix is /usr/local. The installation doesn't necessarily have to conform to the PREFIX-oriented directory structure - the lib/ and arch/ and bin/ and man/ sections and so on

Re: Taint mode (was Re: Variables in external file)

2005-02-19 Thread Ken Williams
On Feb 19, 2005, at 1:51 AM, wren argetlahm wrote: Which reminds me... I've been using the #!/usr/bin/env perl shebang for easier distribution, but env doesn't like switches. Is there a way to set taint mode via `use` or the like (ala use warnings; for -w). No. By definition, any switch in the

Re: Variables in external file

2005-02-18 Thread Ken Williams
On Feb 18, 2005, at 10:39 AM, Mark Wheeler wrote: Hi, Just a quick question. Is it possible to have a bunch of variables in a separate file and then require that file in the script file? It's generally not a wise choice. Better to use something like Data::Dumper to write the data to a file,

Re: Next Problem...

2005-02-15 Thread Ken Williams
On Feb 11, 2005, at 10:39 AM, Chris Nandor wrote: In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Kim Helliwell) wrote: When I type: kim% sudo gluemac /Applications/AddressBook.app I get: What is the glue name? [AddressBook]: ref is not a valid file specification at

Re: TextWrangler

2005-01-21 Thread Ken Williams
On Jan 21, 2005, at 4:45 AM, John Delacour wrote: At 9:34 pm -0800 20/1/05, Chris Nandor wrote: I think the only thing it cannot do that BBEdit does -- from what I can tell -- is that it doesn't talk directly to Affrus (the perl debugger for Mac OS X), like BBEdit can. There is an option in

Re: stupid newbie question

2005-01-18 Thread Ken Williams
On Jan 17, 2005, at 6:06 PM, John Delacour wrote: Apologies first of all for my original useless response. Here's how I would do it -- and it works. while () { /Contig([0-9]+)/i and $hash=$1 and eval my \%$hash; /CR05-C1-102|CR05-C1-103/i and eval \$$hash\{\$\} +=

Re: Problems with Spidering Hack #56

2005-01-15 Thread Ken Williams
On Jan 15, 2005, at 11:04 AM, David Cantrell wrote: Morbus Iff wrote: I'm working on my knowledge of Perl by working through Spidering Hacks (O'Reilly). Right now I'm stumped as to why this hack isn't working (code can be found at http://hacks.oreilly.com/pub/h/981#code. Besides this bug,

Re: Undoing/Fixing an installation of CPAN on Mac OS X 10.2.6

2005-01-10 Thread Ken Williams
On Jan 10, 2005, at 4:39 PM, Sherm Pendley wrote: Start the CPAN shell and enter: o conf init That will repeat the question answer session. Pay attention this time - nuff said about that. Once you're done, enter: o conf commit Or, you can just do o conf and look at which value you

Re: Reading in a File

2004-12-26 Thread Ken Williams
On Dec 26, 2004, at 4:34 AM, John Delacour wrote: At 10:44 pm -0500 25/12/04, Lola Lee wrote: This script has you count words in a file. The line where one is supposed to read in the file being counted is like so: while (defined($line = )) However, when I type this in: perl countwords.pl

Re: File::stat

2004-12-13 Thread Ken Williams
On Dec 13, 2004, at 5:19 PM, Tom McDonough wrote: I've been getting no results from File::stat or a system call to stat. Finally I called stat from the command line and got Command not found. Indeed, it is neither in /usr/bin or /usr/sbin and I could not find a website to download it. I'm

Re: Problems installing modules

2004-12-05 Thread Ken Williams
On Dec 5, 2004, at 6:56 AM, William Ross wrote: On 5 Dec 2004, at 09:07, Marek Stepanek wrote: * installing blib/man1 to ?~name * with PERL_INSTALL_ROOT '' * mkpath(?~name) mkdir ?~name: Invalid argument at /usr/local/lib/perl5/5.8.5/ExtUtils/Install.pm line 115 make: *** [pure_site_install] Error

Re: Module regression

2004-11-17 Thread Ken Williams
On Nov 17, 2004, at 3:38 AM, Phil Dobbin wrote: On 16/11/2004 @ 02:32 GMT, Ken Williams, [EMAIL PROTECTED], wrote: On Nov 16, 2004, at 3:47 PM, Phil Dobbin wrote: I need to step back a version in a module compliled from source (from v.3.0 - v.2.0). What's the best way to go about this (again

Re: Module regression

2004-11-16 Thread Ken Williams
On Nov 16, 2004, at 3:47 PM, Phil Dobbin wrote: I need to step back a version in a module compliled from source (from v.3.0 - v.2.0). What's the best way to go about this (again compiling from source rather than cpan)? * The best way to do this is to have a backup of the previous system with

Re: apple's system transfer tool

2004-10-25 Thread Ken Williams
On Oct 18, 2004, at 5:52 AM, William Ross wrote: Incidentally, I've just used Apple's new system-transfer tool to start off the new powerbook, and noticed that it successfully copies /sw and the contents of /Library/Perl as well as the more obvious directories. Interesting - this is the new

Re: unlocking a file

2004-10-14 Thread Ken Williams
On Oct 14, 2004, at 6:02 PM, jtownsen wrote: I have a hierarchy of folders that I'd like to delete. Normally I'd use rm -r. However, there folders contain at least one file that is locked. I'm familiar with using chmod to change permissions. However a locked file on a Mac, as I understand it,

Re: [OT] Text Editor for OSX

2004-10-03 Thread Ken Williams
On Oct 3, 2004, at 9:46 AM, wren argetlahm wrote: I apologize in advance for the off-topic nature of this posting. I've recently been lamenting the shortcomings of my current text editor for my purposes (SubEthaEdit since my copy of BBEdit is Classic and a new one costs way to much for my budget).

Re: Thunderbird

2004-09-21 Thread Ken Williams
You might be interested in this page, entitled Import Address Book records into to Thunderbird : http://www.macosxhints.com/article.php?story=20040905025741769 When I googled for thunderbird and address, trying to learn what thunderbird was, this was the first link that came up. -Ken On Sep

Re: BBEdit 8.0

2004-09-09 Thread Ken Williams
On Sep 9, 2004, at 8:54 PM, Doug McNutt wrote: I am told, by my son, that the best replacement for MPW in OS neXt is really emacs but it requires that I learn smalltalk or something similar and, though I have read the book, I just ain't there. X11 isn't that easy to use either with my four

Re: [OT?] Shebang question

2004-07-26 Thread Ken Williams
On Jul 26, 2004, at 12:26 AM, Rich Morin wrote: #!/usr/bin/env perl -wl Looking in the Camel, I'm not sure what the -l flag is supposed to be doing for you. You're not using it with -n or -p, so it isn't auto-chomping the input lines; you didn't give it an argument, so it isn't changing the

Re: XML::LibXML install on Mac?

2004-07-23 Thread Ken Williams
On Jul 23, 2004, at 4:21 PM, Ingo Weiss wrote: Hi all, I am using XML::LibXML and so far did all the testing on my Linux web server (meaning that I had to be online to test). Now I would like to set my Mac up for local development - is it possible to install XML::LibXML on a Mac (Panther)? Can I

Re: Mac::Glue and Address Book

2004-07-18 Thread Ken Williams
On Jul 18, 2004, at 8:54 PM, John Delacour wrote: At 5:24 pm -0700 18/7/04, Chris Nandor wrote: I can't see a way. If someone can tell me how to do it in AppleScript, I can convert it to Mac::Glue. But I can't see how to do it in AppleScript either. tell app Address Book to get the value of

Re: Mac::Glue and Address Book

2004-07-16 Thread Ken Williams
Hi Chris, This is all working great. I just realized, though, that my initial email search isn't working - to find a person with the email $foo, I've tried: $person = $glue-obj(people = whose(email = equals = $foo)); Obviously this can't work, because email is an element, not a property. Is

Re: Mac::Glue and Address Book

2004-07-15 Thread Ken Williams
Thanks, Chris - this will give me enough info to do what I need to do, I'm sure. Hopefully my Mac::AddressBookMerger won't be too far behind... my wife needs it to merge the addresses from our various address lists into one place. -Ken On Jul 14, 2004, at 3:54 PM, Chris Nandor wrote: Hope

Re: Mac::Glue and Address Book

2004-07-10 Thread Ken Williams
PM, Ken Williams wrote: Hi, When I get a record from the Address Book like so: use Mac::Glue ':all'; my $ab = Mac::Glue-new('Address Book'); my $person = $ab-obj( people = whose(AND = [[ first_name = begins_with = 'Smorgasbord' ], [ last_name = equals = 'Milhouse

Re: Mac::Glue and Address Book

2004-07-10 Thread Ken Williams
Oh, and while I'm at it: I can't quite figure out how to change the values of an existing Address Book record. I guess there are two cases: changing 'property' values and changing 'element' values. Any examples I could get for that would be great. -Ken On Jul 10, 2004, at 11:16 PM, Ken

Krazy Mac::Glue entities

2004-07-04 Thread Ken Williams
Um, When I do the following: use Mac::Glue ':all'; my $ab = Mac::Glue-new('Address Book'); my $person = $ab-obj( people = whose(AND = [[ first_name = begins_with = 'Smorgasbord' ], [ last_name = equals = 'Milhouse']] ); the $person object is absolutely nuts. It's

Re: Mac::Glue and Address Book

2004-07-04 Thread Ken Williams
On Jul 4, 2004, at 1:23 PM, Chris Nandor wrote: In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Ken Williams) wrote: When I get a record from the Address Book like so: use Mac::Glue ':all'; my $ab = Mac::Glue-new('Address Book'); my $person = $ab-obj( people = whose

Re: Curses trouble

2004-07-01 Thread Ken Williams
I couldn't install it either. I note on http://testers.cpan.org/show/Curses.html that the failures greatly outweigh the passes, FWIW. However, how come in your example it's libCurses.dylib instead of libcurses.dylib? -Ken On Jul 1, 2004, at 2:02 PM, Mike Lemmon wrote: I've gotten Curses.pm

Re: n00b needs help with file arguments

2004-06-01 Thread Ken Williams
On May 31, 2004, at 4:13 PM, Ian Ferguson wrote: I program AppleScript as well. In fact, this is what introduced me to Perl and Ruby. Since Perl can handle many of the things I need faster and more efficiently, I started digging into Perl to do things like sort arrays, etc. In AppleScript, If

Re: [BUG ?] sort/reverse or RegExp problem

2004-05-18 Thread Ken Williams
On May 18, 2004, at 3:37 AM, allan juul wrote: hmm, ok so if i do one test that actually matches late in my string and later do a test that would match earlier, the latter will never match ? i didn't know that; to me it doesn't sound logical. to me i'm doing a complete fresh test in the regexp

Re: [BUG ?] sort/reverse or RegExp problem

2004-05-17 Thread Ken Williams
Hi Allan, No bug; here's a simpler example that shows what's going on. $str = one two; if ($str =~ /one/g) { print Found one\n } print pos(\$str): , pos($str), \n; if ($str =~ /two/g) { print Found two\n } print pos(\$str): , pos($str), \n; $str = one two; if ($str =~ /two/g) { print Found

Re: Sort by Mod Date

2004-05-13 Thread Ken Williams
On May 13, 2004, at 6:19 PM, [EMAIL PROTECTED] wrote: #!/usr/bin/perl my $dir = /Users/jay/Desktop/Other Stuff/old stuff 4; opendir FOLDER, $dir or die Cannot open $dir: $!; foreach $file (readdir FOLDER) { next if $file =~ /^\./; $path = $dir/$file; next unless -f $path and -r $path;

Re: [slightlyOT] reading logs with long urls

2004-05-03 Thread Ken Williams
On May 2, 2004, at 8:17 PM, Joel Rees wrote: My apache log files show that I'm getting two or more of those long url attacks every day, and access_log grows to over 4Mb in just a week, in spite of the fact that there are less than ten valid accesses in any particular day. How about configuring

Re: backing up using DejaVu

2004-05-03 Thread Ken Williams
On May 3, 2004, at 6:37 PM, Jerry LeVan wrote: Hmmm, maybe it will work... I started the following shell script #!/bin/sh i=1 while true do echo $i i=`expr $i + 1 ` done I forced the system to sleep for a few seconds, woke it up and the script kept on trucking... Oh, certainly - you can interrupt

Re: backing up using DejaVu

2004-05-03 Thread Ken Williams
On May 3, 2004, at 5:18 PM, Joseph Alotta wrote: Hi Jerry, I used sudo psync -d / /Volumes/backup and it worked real nice. I kind of like watching it work while I do other things. If my powerbook were to sleep in the middle of it, would it break something or would it just pick up where it

Re: Copying files

2004-04-28 Thread Ken Williams
On Apr 28, 2004, at 2:11 AM, Mark Wheeler wrote: Ok, It's working great, now. Thank you Ken and Bruce and anyone else I am forgetting. Now the to finish the ride, all I have to do now is figure out how to get the file from my PC and copy to an external hard drive. I'm resuming all I need are

Re: hi

2004-04-28 Thread Ken Williams
On Apr 27, 2004, at 11:52 PM, devulapally krishna wrote: Hi all i'm working on perl. i need to download webpages from the internet and analyze them,which i'm unable to do with perl. Please help me. I highly recommend WWW::Mechanize. It's got a little bit of a learning curve (I'll probably get

Re: Copying files

2004-04-28 Thread Ken Williams
On Apr 28, 2004, at 11:48 AM, Mark Wheeler wrote: Hi Ken, I switched that because it was suggested that writing files over system boundaries might be a problem. What is the difference between the two? It sounds like, from your comment, that they do very different things. Yeah - rename() moves

Re: Copying files

2004-04-27 Thread Ken Williams
On Apr 27, 2004, at 11:59 AM, Wiggins d Anconia wrote: The script is as follows: #!/usr/bin/perl -w use strict; my @files = db1.txt, db2.txt, db3.txt, db4.txt; foreach (@files) { rename /path/to/pc/file/$_, /Users//Documents/$_..bak; You should always check that 'rename' succeeded (as

Re: Copying files

2004-04-27 Thread Ken Williams
On Apr 27, 2004, at 5:07 PM, Mark Wheeler wrote: Yup. You're right. I missed that one. Here's what I did to simplify the testing of the script. #!/usr/bin/perl -w use strict; use File::Copy; copy(/Users/xx/Documents/db1.txt,

Re: Copying files

2004-04-27 Thread Ken Williams
On Apr 27, 2004, at 5:46 PM, Bruce Van Allen wrote: On 4/27/04 Mark Wheeler wrote: Good question. Here are the results. The permissions for the /Users/xx/Documents directory is: drwx-- 7 xx xx 238 27 Apr 15:08 Documents The permission for the /Users/xx/Library/Scripts

Re: Merging into Address Book

2004-04-22 Thread Ken Williams
On Apr 21, 2004, at 9:11 AM, Chris Nandor wrote: Did you look at the Address Book example in ex/ ? It uses whose() to find entries. YOU SIR ARE A GEM K. Yeah, I'd seen it, but I forgot about it when I saw the other example you mailed to the list. Thanks. -Ken

Re: Merging into Address Book

2004-04-20 Thread Ken Williams
On Apr 14, 2004, at 2:57 PM, Chris Nandor wrote: I've been called out! ;-) Here's a version with Mac::Glue. ... Say, I built the Address_Book glue and looked through its docs, but I don't see methods to search the database for entries that have certain properties. Do you know of any way to

Re: Merging into Address Book

2004-04-15 Thread Ken Williams
Excellent. So maybe I'll make a little command-line app to do a merge (with prompting) from a tab-delimited file into Address Book. Or maybe I won't, but I bet I will. -Ken On Apr 14, 2004, at 2:57 PM, Chris Nandor wrote: I've been called out! ;-) Here's a version with Mac::Glue.

Re: Merging into Address Book

2004-04-09 Thread Ken Williams
On Apr 8, 2004, at 1:33 AM, Jason Fleetwood-Boldt wrote: At 8:51 PM -0500 4/7/04, Ken Williams wrote: Yeah, that's probably a good way to go. Perhaps I should just synchronize directly from Palm Desktop to Address Book, rather than exporting to vCards. -Ken Unless you mean syncrhronize Palm

Re: Merging into Address Book

2004-04-07 Thread Ken Williams
On Apr 7, 2004, at 9:11 AM, Bill Jastram wrote: Ken: Although it's not a Perl soultion, here's a link which might give you just what you need: http://www.macosxhints.com/article.php? story=20030831221023355query=vcard Hmm - I'm a little hesitant to use that (or a perl equivalent), as it

Re: Merging into Address Book

2004-04-07 Thread Ken Williams
On Apr 6, 2004, at 10:18 PM, Chris Devers wrote: On Tue, 6 Apr 2004, Ken Williams wrote: For my wedding Congratulations! I made an AppleWorks database containing the names of all the wedding guests, their addresses, emails, and so on. Now I want to merge that info back into Address Book

Merging into Address Book

2004-04-06 Thread Ken Williams
Hey, For my wedding, I made an AppleWorks database containing the names of all the wedding guests, their addresses, emails, and so on. Now I want to merge that info back into Address Book. Anyone have recommendations for how to do this nicely? I thought about creating vCards and merging

Re: Preview.app opening multiple files

2004-04-01 Thread Ken Williams
On Mar 31, 2004, at 6:53 PM, Bohdan Peter Rekshynskyj wrote: I still would try to do something such as (rough script here) open COMMAND ls *.files |; # Don't forget to code a die here if unsuccessful in opening. Defensive programming! while COMMAND { $theParms .= $_; # you may or may

Re: Trying to understand signals and restartable system calls

2004-03-19 Thread Ken Williams
On Mar 19, 2004, at 11:34 AM, Mark Alldritt wrote: Hello, I'm trying to understand how signals and restartable system calls interact. Take this example: #!/usr/bin/perl $SIG{USR2} = sub { print Here I Am\n; }; print Starting...\n; my $abc; while (read STDIN, $abc, 20) { print $abc\n; }

Re: Getting the size of a folder with Mac::Glue

2004-03-16 Thread Ken Williams
On Tuesday, March 16, 2004, at 12:48 AM, Rick Measham wrote: I'm trying to get the size of a folder and figure Mac::Glue would be the way to go. However I'm getting back a 0: [...] (If there's a better way to get the size of a folder, please let me know!) You can use `du -sk $folder` to get

Re: Affrus PLUS Perl/TK

2004-03-12 Thread Ken Williams
On Thursday, March 11, 2004, at 04:38 PM, Bohdan Peter Rekshynskyj wrote: On Mar 11, 2004, at 17:21, Chris Nandor wrote: Affrus is an excellent product. I hate using the Perl debugger on the command line, it gives me the willies. Affrus makes it much easier to find problems in your perl

  1   2   3   4   >