RE: Semcarlbd letrtes sepur! (Scrambled letters super!)

2003-09-19 Thread Allen, Greg
In which case I can beat: -pX s#\B\w+\B#join,map chop,sort map{rand.$_}$=~/./g#eg With: -p s#\B\w+\B#join,values%{{map{rand,$_}$=~/./g}}#eg Greg -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, September 19, 2003 2:11 PM To: [EMAIL

RE: What does }{ mean?

2004-02-06 Thread Allen, Greg
, 2004 3:37 PM To: Allen, Greg Cc: [EMAIL PROTECTED] Subject: Re: What does }{ mean? X-Original-To: [EMAIL PROTECTED] Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm From: Allen, Greg [EMAIL PROTECTED] Date: Fri, 6 Feb 2004 14:51:57 - X-WSS-ID: 6C3D75871563186-01-01 X

RE: s/// w/o intermediate variables?

2004-05-04 Thread Allen, Greg
use File::Spec; my $package = 'Foo::Bar::Baz'; require File::Spec-catfile(split /::/, $package); more generally, this works for me: $tranformed = map {local $_=$_; s,::,/,g; $_} $package Greg -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 04,

RE: Regular expression for years after a given one

2004-06-01 Thread Allen, Greg
Think it might be bust when year contains a 9. e.g. year = 2009 $c = 9+1 = 10 qr/^\d*(?:${1}${2}${3}[$c-9]... is: qr/^\d*(?:200[10-9]... and [10-9] matches any digit, so 2000, 2001 etc. would incorrectly pass. Greg -Original Message- From: Jose Alves de Castro [mailto:[EMAIL

RE: Shortening a script, but aiming for efficiency

2004-10-01 Thread Allen, Greg
Warning: no fun :( next doesn't skip the continue block where the print is done. Instead you could: perl -pe $_= if $. 2; You have materially changed the substitution before: | - yours: | - the effect of 4) is to mean that \t\t - | and \tA - \tA. No idea why this is being done. Greg

RE: Dynamically creating a hash for keys()

2004-10-19 Thread Allen, Greg
print values %hash Greg -Original Message- From: Jason Foster [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 19, 2004 2:51 PM To: [EMAIL PROTECTED] Subject: Dynamically creating a hash for keys() Can anyone help me to understand why this code refuses to compile? Even better, can

RE: Matching at least $x words out of @words

2005-05-05 Thread Allen, Greg
safer: $x = grep { $string =~ quotemeta } @words Greg -Original Message- From: Iain Loasby [mailto:[EMAIL PROTECTED] Sent: Thursday, May 05, 2005 3:39 PM To: José Castro; fwp@perl.org Subject: RE: Matching at least $x words out of @words -Original Message- From: José

RE: Naming the @{[]} operator

2006-07-13 Thread Allen, Greg
Better example: bash-2.05$ perl -le 'print localtime'; perl -le 'print @{[localtime]}' 9151013610641931 9 15 10 13 6 106 4 193 1 Greg -Original Message- From: Chasecreek Systemhouse [mailto:[EMAIL PROTECTED] Sent: Thursday, July 13, 2006 9:30 AM To: fwp@perl.org Subject: Re: Naming the

RE: YN golf

2008-04-01 Thread Allen, Greg
Magoo! -Original Message- From: John W. Krahn [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 01, 2008 7:17 AM To: fwp@perl.org Subject: Re: YN golf Uri Guttman wrote: someone posted (and it wasn't homework) for an easy way to get all possible combos of YN (5 chars so 32 answers). he