Re: [MacPerl] listing directory contents

2003-04-02 Thread Paul McCann
Hi Gene, you wrote... > I keep getting the sub ErrorMessage text and don't understand why. > Isn't the "." supposed to be for the working directory? ie where the > script resides? That's a unix-specific way of specifying the current directory. In pre-Mac OS X perl you'll need to use the

Re: [MacPerl] bad regex, no cookie

2003-04-02 Thread Paul McCann
Hi Nicholas, you wrote... (comments in the script removed) > #!perl > print input_test('a', 'numeric'), "\n"; > sub input_test { > my ($input, $test_type, $output) = ($_[0], $_[1], $_[0]); > if ($test_type eq 'numeric' and not $input =~ m/^\d*$/) { > $ouptpu

Re: [MacPerl] random?

2003-02-26 Thread Paul McCann
Nicholas G. Thornton asked: > I was wondering how I would go aboput randomly ordering N number of > things. I'm running an experiment and I want to randomize the order > things appear in. I'm pretty sure that the subroutine in the following is lifted directly from the Perl Cookbook (which is high

Re: [MacPerl] How to generate index numbers

2002-02-01 Thread Paul McCann
Hi Bart, > I don't know why you think you need that "eval". What could ever go > wrong? Good question... I wish I could concoct a reasonable excu^H^H^H^Hanswer on the fly: suffice to say that you've just bleached another piece of my dirty laundry that (thankfully) hadn't been hung out in public

Re: [MacPerl] How to generate index numbers

2002-02-01 Thread Paul McCann
Here's one way: definitely not designed to compete with bit vectors and so forth, but probably OK if your lists are pretty small. Gulp: maybe lookahead requires the 5.6.1 beta. (Cranks up classic: hmm, only have the 5.6.1 available: script works fine there, but I'm pretty sure 5.004 will be a no-g

[MacPerl] Spaces at the beginning...

2002-01-24 Thread Paul McCann
Hi Anette, you wouldn't have obtained that list of fruit from a Windows box by any chance? I would guess that the "extra character" is probably a line feed. Windows machines use "CRLF" (carriage return + line feed) as line separator, while the pre-OSX mac convention is a bare "CR". The reason yo

Re: [MacPerl] Using "use" with both MacPerl 5.6.1b2 and 5.2.0r4

2001-12-13 Thread Paul McCann
Hi David, "require" doesn't allow you to use the function without parentheses: "use strict;" in your script would have thrown a "bareword not allowed" exception. The "import" call allows you to use gettimeofday() instead of the fully qualified version, but it doesn't serve as a function decla

[MacPerl] Macperl's Editor

2001-11-18 Thread Paul McCann
> Bill Becker wrote: > > Just some ramblings... > > Detlef Lindenthal wrote: > > >Re: Editor Just to try and save Chris from YAAAM (Yet another "as always" message): "As always, please submit a bug report or a patch or a feature request to SourceForge." (That'll be macperl.sf.net) [[ For

Re: [MacPerl] Cli/Serv Int. Pt 2

2001-06-24 Thread Paul McCann
Adam Stern asked (and Jeff Lowrey replied)... >>I'd like some code examples, or at least a huge hint. Thank you very >>much. > >Sounds like you want to do more than one thing at the same time. >You're going to have a hard time doing that within MacPerl, since >MacPerl is not multi-threaded nor m

re: [MacPerl] Faster Email Module?

2001-06-15 Thread Paul McCann
Hi Bruce, you asked: >I am looking for a faster email module than the standard Net::SMTP >stuff. My script takes so long to run that the caller times out. How long is "so long" (roughly)? Net::SMTP should be useably quick; the blockage should only be in establishing the connection to t

Re: [MacPerl] Calling a Perl script from AppleScript

2001-06-11 Thread Paul McCann
Hi Kathy, > I'm very new at this. I know some Perl and barely any AppleScript. I would > like to improve an AppleScript that parses a large text file ( > 500k) and > re-writes it to another file so that it can be imported into a FileMaker > database. I would like to call a perl script to do the p

Re: [MacPerl] Trouble Installing Module using CPAN-Mac

2001-05-17 Thread Paul McCann
ng; the module you're after should work in that environment.]] Cheers, Paul ------ on 2/28/01 3:46 PM, Paul McCann at [EMAIL PROTECTED] wrote: > I also note that Spreadsheet::WriteExcel now "requires" &

Re: [MacPerl] Installing Perl modules on Linux not as root

2001-04-10 Thread Paul McCann
Hi Emmanuel, if questions about MacOSX have been ushered elsewhere (as they should have been) I don't really see how this one is even in the ballpark. Maybe I'm a softie... > I want to install these localy in my account at my ISP and I can't su > to root. I tried to install these locally, via th

[MacPerl] Re: pod2pdf

2001-02-28 Thread Paul McCann
Alan Fry wrote: >Pod::Pdf (on CPAN) was written largely to provide a quick and easy >way of getting a reasonable looking hard copy of a 'pod'.[...] > >Although it is a 'cross-platform' module it was specifically designed >for the Mac and in particular as a solution to the 'Shuck' printing >proble

re: [MacPerl] Failed to launch MacPerl (possibly because of amemory problem).

2001-02-11 Thread Paul McCann
Hi Axel, On Sunday, 11 February 2001 at 7:23PM you asked: >Ever since I installed MacOS 9.1 I get the following error when I >open MacPerl by launching a droplet. > >I never get any other memory problems and I even tried it with >MacPerl set to 60 MB. I also rebuilt my desktop file. >

Re: [MacPerl] Mail::Mailer not working under MacPerl (growl)

2001-02-09 Thread Paul McCann
Hi, Stop growling and move on! Plenty of modules in the C-Pan. Fry a few. Here are a couple of possibly easier solutions that work fine (mumble mumble a couple of trivially fixed warnings due to InternetConfig.pm on the first one might need to be fixed to be clean under -w. Maybe the latest vers

Re: [MacPerl] FTP mirroring script?

2001-02-08 Thread Paul McCann
Greetings all, Just a quick reference for people trying to reinvent this particular wheel (not that there's anything wrong with that...) You might want to compare your solutions with what Gerard Lanois put together for the Perl Journal a couple of years ago. Might at least stir up a couple of id

Re: [MacPerl] Evaluating within a pattern

2001-01-17 Thread Paul McCann
Unreal: I manage to maintain my "king of redundancy" crown without even trying! Anyone interested in a dash of regicide? Veronicacide too? (Ronald wrote...) > Although, since scalar hash values interpolate in double-quoted strings > anyway, the /e is actually unnecessary with that replacement. >

Re: [MacPerl] Evaluating within a pattern

2001-01-17 Thread Paul McCann
Hi John, you asked... > $_ = "Señor"; > s~([\x80-\xFF])~$1---~g; > print; # Señ---or > > I want to evaluate ord($1) and then look up in a table that will give > me "0x00F1" so that I can print Señ[0x00F1]or. Maybe something like... $_ = "Señor"; %table=(150=>"[0x00F1]", 151=>"[0x00F2]