Re: Zip/Postal codes.

2003-01-02 Thread Philip Newton
On Thu, 2 Jan 2003 16:02:04 +0100, [EMAIL PROTECTED] (Marius Ascheberg) wrote: For all other countries, I've nothing so far. Can anyone help? http://www.uni-koeln.de/~arcd2/3d.htm http://www.columbia.edu/kermit/postal.html , by the Kermit people, may also be of interest. Cheers, Philip

Re: sort numbers

2003-01-02 Thread Philip Newton
On 01 Jan 2003 21:54:25 -0800, [EMAIL PROTECTED] (Randal L. Schwartz) wrote: Philip == Philip Newton [EMAIL PROTECTED] writes: Philip You're not allowed to compare numbers? That will make it difficult to Philip find out when the list is sorted. use ESP::Psychic qw(infer_sortedness); Ah

Re: sort numbers

2003-01-02 Thread Philip Newton
On Thu, 2 Jan 2003 12:41:38 -0800 (PST), [EMAIL PROTECTED] (Artist Google) wrote: Well, I am not looking for randomly achieved solutions. and looking for minimum steps to achieve solution. I thought that was obvious. I was being sarcastic. I thought *that* was obvious. Cheers, Philip

Re: sort numbers

2003-01-01 Thread Philip Newton
On Wed, 1 Jan 2003 13:02:58 -0800 (PST), [EMAIL PROTECTED] (Artist Google) wrote: Hi, I have this puzzle. Given N numbers, N4, you have to sort the numbers. The only operation permitted is you can rotate any sequencial 4 numbers in reverse order. or you can roate the entire list

Re: Function parameter passing (was: Re: limit the list)

2002-11-20 Thread Philip Newton
On Wed, 20 Nov 2002 10:35:11 -0600, [EMAIL PROTECTED] (Steven Lembark) wrote: -- Andrew Molyneux [EMAIL PROTECTED] I'd probably do: my ($max, $sep, $end) = @_; Yes, becuase if you did it this way you'd get $end equal to the integer coult of the number of list arguments passed plus one

Re: Fwd: Re: interesting typo I couldn't see

2002-02-17 Thread Philip Newton
On 17 Feb 02, at 11:05, Patrik Grip-Jansson wrote: On Sun, 17 Feb 2002, Philip Newton wrote: Well, not really C since you rely on '//' introducing a comment-to-end-of-line. That's a C++-ism which some C compilers support but which isn't part of the C standard. No, you're wrong

Re: Explanation of my 189-stroke Perl-is-C;C-is-Perl entry

2002-02-17 Thread Philip Newton
On Sun, 17 Feb 2002 12:02:43 -0800, [EMAIL PROTECTED] wrote: On Sun, Feb 17, 2002 at 07:35:24AM +0100, Philip Newton wrote: On Sun, 17 Feb 2002 09:42:55 +1100, [EMAIL PROTECTED] (Andrew Savige) wrote: you have a choice of 3 different languages (Perl, C or C++). ^.^ Well

Re: Explanation of my 189-stroke Perl-is-C;C-is-Perl entry

2002-02-17 Thread Philip Newton
On Sun, 17 Feb 2002 11:55:27 +0100, [EMAIL PROTECTED] (Peter Makholm) wrote: Philip Newton [EMAIL PROTECTED] writes: Well, not really C since you rely on '//' introducing a comment-to-end-of-line. I cannot find the C99 standard. But it looks like '//' was introduced as comment-to-end

RE: Explanation of my 189-stroke Perl-is-C;C-is-Perl entry

2002-02-17 Thread Philip Newton
On 18 Feb 02, at 10:46, [EMAIL PROTECTED] wrote: Philip Newton wrote: Well, existing compilers tend to be slow to implement new standards such as C99 So for my purposes, standard C is ANSI C i.e. KR 2nd ed.. YMMV. Interestingly, in this particular case, many vendors are very

Re: Fwd: Re: interesting typo I couldn't see

2002-02-16 Thread Philip Newton
On Sat, 16 Feb 2002 11:05:14 -0800, [EMAIL PROTECTED] (Vicki Brown) wrote: It took me a while to find the problem... when I did I was somewhat amused --- Begin Forward --- if (...) { my @item_parts = split(/\n/, $item); printf ORDER (\n%4d

Re: Golf and the Perl Review

2002-02-09 Thread Philip Newton
On Fri, 8 Feb 2002 09:33:01 -0500, [EMAIL PROTECTED] (Bill -Osx- Jones) wrote: Not to be dumb as a stump, but are you saying that - under Win32 - STDERR would not appear in the console window? That, because of possibly internal Win32 issues, it must always be sent to a file? What I think

Re: substitution question

2002-02-02 Thread Philip Newton
On Sat, 02 Feb 2002 22:24:05 +0100, [EMAIL PROTECTED] (Bart Lateur) wrote: On Sat, 2 Feb 2002 12:35:13 -0800 , Pradeep Sethi wrote: and I want to use regexp , without using sprinf. !?!?!! WTF is wrong with sprintf()? It's a proper tool for this job. Next you'll want to replace

Re: Better ?

2002-01-24 Thread Philip Newton
On Thu, 24 Jan 2002 14:58:09 -0500, [EMAIL PROTECTED] (Michael G Schwern) wrote: On Thu, Jan 24, 2002 at 11:24:47AM -0500, Bill -OSX- Jones wrote: $c = grep {/[osx]/i} @_; Regardless, the {} there is redundant and actually slows you down a bit (Perl has to enter/leave that block on each

Re: Golf challenge: decode CETI message

2002-01-11 Thread Philip Newton
On Wed, 9 Jan 2002 20:34:30 -0500, [EMAIL PROTECTED] (Keith C. Ivey) wrote: But s'\x0\xff' @' to make it shorter and more visible on my system. y(s))y) ? Cheers, Philip

Re: test a password string for correctness

2001-12-20 Thread Philip Newton
On Thu, 13 Dec 2001 18:10:26 -0500, [EMAIL PROTECTED] (Ryan Fischer) wrote: This should do it I think: /[a-zA-Z]/==3/[0-9]/==2/^.{5,}$/; Pattern match in scalar context returns true or false, so the maximum number is 1. You'll never get 3 out of a pattern match in scalar context (and ==

Re: test a password string for correctness

2001-12-20 Thread Philip Newton
On Thu, 13 Dec 2001 19:25:02 -0500 (EST), [EMAIL PROTECTED] (Jeff 'Japhy' Pinyan) wrote: I'd probably include capitalized operators in the obscure group Which capitalised operators? NE, LT, and friends? I think they went away in bleadperl... didn't they? Cheers, Philip

Re: test a password string for correctness

2001-12-20 Thread Philip Newton
On Thu, 13 Dec 2001 10:50:11 -0500, [EMAIL PROTECTED] (Ronald J Kimball) wrote: (y/a-zA-Z// 2) (y/0-9// 1) Each numeric comparison will return either 1 or 0. In my experience, 1 or , rather than 1 or 0. Or is FALSE (PL_NO?) a special value which looks like 0 to operators that care, such

Re: Santa Hole 4 (mid.pl) Post Mortem

2001-12-07 Thread Philip Newton
On Fri, 7 Dec 2001 10:58:03 +1100 , [EMAIL PROTECTED] (Andrew Savige) wrote: *** Hole 4 (mid.pl) *** --- Piers Cawley - 25 #!/usr/bin/perl -p0 $_=$1while/.(^.+)^/ms --- Rick Delaney - 25 #!/usr/bin/perl -p0 $_=$1while/.^(.+)^/sm --- Karsten

Re: The Santa Claus Golf Apocalypse

2001-12-06 Thread Philip Newton
On Tue, 4 Dec 2001 22:33:45 +0100 (CET), [EMAIL PROTECTED] (Philippe 'Book' Bruhat) wrote: it's straightforward Perl, as documented in Amelia What's Amelia? Cheers, Philip

Re: tri-state flags

2001-12-06 Thread Philip Newton
On Thu, 06 Dec 2001 13:46:41 +0100, [EMAIL PROTECTED] (Bart Lateur) wrote: Also intersting to note is its behaviour WRT perl booleans. As you know, (or should know ;-)), is that these have a dual nature: a boolean false is 0 in numerical context, and in string context. Well, apparently ~

Re: middle line, redux

2001-12-03 Thread Philip Newton
On Sun, 2 Dec 2001 13:49:04 + (GMT), [EMAIL PROTECTED] (Jonathan e. paton) wrote: I honestly think I've found the only true solution, which is: perl -p Hm? How does this print only the middle line of a file? Cheers, Philip

Re: isprint Golf Challenge

2001-11-17 Thread Philip Newton
On Fri, 16 Nov 2001 23:02:57 -0500, in perl.fwp you wrote: foreach my $num (0..255) { my $chr = chr $num; $U2P{$chr} = $chr =~ tr/\x20-\x7F// ? $chr : '\\'.sprintf(%03o,$num); } That should be \x20-\x7E, I think. \x7F is a control character (DEL, \c?). Cheers, Philip

Re: isNumber( ) ??

2001-10-20 Thread Philip Newton
On Fri, 19 Oct 2001 18:05:54 +0100, [EMAIL PROTECTED] (Piers Cawley) wrote: #!/usr/bin/perl6 sub is_number ($number) { return +$number eq 'NaN' } s/eq/ne/ ? Cheers, Philip