a sub, you better localise it or
someone who calls your code is going to be very surprised at some
point (that includes yourself).
Why is why you can write « my $_ » in recent Perls, I think.
--
Philippe BooK Bruhat
Honesty is its own reward. Dishonesty is its own punishment
And the baby cart is full of surprises:
http://www.sokkmagazin.hu/cikkek/kozure_okami/4.gif
--
Philippe BooK Bruhat
The surest path to chaos is too much organization.
(Moral from Groo #4 (Image))
, but babycart transmits the idea
that what you put inside is fragile and simple... or should I have
slept more?
With half the number of syllabes, babycart is much faster to say
(in case you need to dictate a program over the phone).
--
Philippe BooK Bruhat
The greatest monster of them all
Le vendredi 07 juillet 2006 à 18:54, Jose Castro écrivait:
On Jul 7, 2006, at 4:36 PM, Philippe BooK Bruhat wrote:
Hi,
I recently thought about the @{[]} operator again (one of the
semi-famous
Perl secret operators), and called it the babycart operator.
I think I got the name from
in the other direction when doing the substraction.
--
Philippe BooK Bruhat
The only way to get a better government is to get better voters.
(Moral from Groo The Wanderer #109 (Epic))
);
$re = join '', map { '(?=.*(' . (quotemeta) . '))?' } @words;
$re = qr/$re/;
my @matches = grep defined, foo bar baz =~ $re;
The capturing parent allow you know which word was matched.
--
Philippe BooK Bruhat
He who revels in being bigger forgets that he is the larger target
to take out.
--
Philippe BooK Bruhat
Ignorance weaves a web from which none can escape.
(Moral from Groo The Wanderer #52 (Epic))
Le mercredi 02 février 2005 à 21:36, Sébastien Aperghis-Tramoni écrivait:
Philippe 'BooK' Bruhat wrote:
So we have :
symbolnicknameRole
--
= spaceship documented operator
0+venus
'$_=zbrughau;$b=()=/u/g;print $b'
There's also @{[]} but I don't know f it has a name.
Usage: print splatt @{[ ... ]} pow
where ... is any valid expression, and the result list is join()ed with $
(space).
--
Philippe BooK Bruhat
There are two sides to every cause. Do not join one until you know
Le mardi 01 février 2005 à 18:57, Vladi Belperchinov-Shabanski écrivait:
On Tue, 1 Feb 2005 15:57:33 +0100
[EMAIL PROTECTED] (Philippe 'BooK' Bruhat) wrote:
There's also @{[]} but I don't know f it has a name.
Usage: print splatt @{[ ... ]} pow
where ... is any valid expression
Le jeudi 14 août 2003 à 08:52, Bennett Todd écrivait:
I love this list.
-Bennett
[EMAIL PROTECTED](P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*
Another reason to love this list is that it is not scared by your .signature.
Which I like very much :-)
--
Philippe BooK Bruhat
A man
On Mon, 30 Sep 2002, Davide Copelli wrote:
I am using this script to print an image using img tag
print Content-type:image/gif\n\n;
gifdata = `cat $giffile`;
print gifdata;
The problem is that it works on unix but not on windows operating sistem
Fun aswer: s/cat/type/
A little more
On Wed, 22 May 2002, Patrick Gaskill wrote:
Ah, but did you try running this? $a-- will be false, meaning it will
short-circuit, and never get to do_something().
I think you are confusing
$a$a--do_something();
with
$a--$ado_something();
--
Philippe BRUHAT - BooK
Financez le
On Mon, 25 Mar 2002 [EMAIL PROTECTED] wrote:
But is this the official perl-golf mailing list?
Or is Ronald or someone else going to create a new
[EMAIL PROTECTED] and change the charter of [EMAIL PROTECTED]?
Why do we need to have perl twice in the same address?
[EMAIL PROTECTED] seems
En réponse à Stephen Turner [EMAIL PROTECTED]:
On Mon, 18 Mar 2002, Piers Cawley wrote:
So, how about having some way of letting spectators see the
entries. It would (of course) require some sort of honour system; at
the very least disbarring any spectator who has seen a solution from
En réponse à Greg Bacon [EMAIL PROTECTED]:
In message [EMAIL PROTECTED],
Randal L. Schwartz writes:
: [...] Obfuscated Perl and Golf are both uninteresting to me.
I coined the phrase Perl golf, but the flood of golf threads have
made golf really, really boring. I *did* like
On Sun, 17 Mar 2002, Jonathan E. Paton wrote:
And yes, once you looked at the naïve solution,
maybe all your submissions for that hole are in
the beginner's?
That'd be good... making the difference between a
beginner and an expert more distinct. The
beginners could also get some more
En réponse à Dave Hoover [EMAIL PROTECTED]:
And on a semi-related topic, so far the web interface uses
a golfer's email addie as way to confirm his/her identity. But
since a lot of us are on fwp and see each other addie, isn't
that a risk? I mean, if Andrew hadn't been dozens of
En réponse à Stephen Turner [EMAIL PROTECTED]:
On Fri, 8 Mar 2002 [EMAIL PROTECTED] wrote:
Here are some statistics from the current series of games:
fwp Santa (head, tail, ...):35 players on scoreboard
irc Christmas (human sort): 11 players on scoreboard
fwp Get Even:
En réponse à Keith C. Ivey [EMAIL PROTECTED]:
Marcelo E. Magallon [EMAIL PROTECTED] wrote:
A question of my own: why doesn't
s/\B.\B/$$/g
work as I expect, namely abcd - abbccd. I really can't figure it
out by reading the docs.
I wondered that too. I figured it was
En réponse à Prakash Kailasa [EMAIL PROTECTED]:
On Tue, Feb 19, 2002 at 01:27:52AM +0100, Philippe 'BooK' Bruhat wrote:
#!/usr/bin/perl -l
print{1,1,A,360,B,47,Z,46655}-{+pop}
This would fail the test program. You need to change it to:
#!/usr/bin/perl -l
print{1,1,A0,360,'1B',47
/?47:/Z/?46655:1
__END__
One char shorter... but still cheating ;-)
#!/usr/bin/perl -l
print{1,1,A,360,B,47,Z,46655}-{+pop}
--
Philippe BooK Bruhat
No one profits at the death of another (except for the mortician).
(Moral from Groo The Wanderer #7 (Epic))
En réponse à Jeff Bisbee [EMAIL PROTECTED]:
What about a web solution. Maybe use golf.perl.org. All your really need
is a text field that will accept the golf snippet. What is also cool is
that if use something like use.perl.org, where thre are logins so we can
have a clear winner and
En réponse à [EMAIL PROTECTED]:
David H. Adler wrote:
If any of you have read The Perl Review
(http://www.perl.org/ThePerlReview/), you may have noticed,
buried in the back, a golf challenge.
To make a long story short, we're looking for someone to be
our Master of Golf.
I like
';$_='';# 59 /e, © 2001 Philippe BooK Bruhat
*_=*ARGV;@_=qw(4a4a2bfe01ac410d0105f4fd0dae30150dfab448f90208fa0d98
pop print+chr(shift) print+chr(shift) unshift@_,(shift()+shift())x2
push@_,(pop,pop)x24 ; unshift@_,(map{unpack'c',$_}split//)[0..25] ;
s/../chr(hex$)/eg $_=substr(shift,0,52) @_=map{s
En réponse à Matthew Byng-Maddick [EMAIL PROTECTED]:
I was actually wondering about whether people should post affiliations to
pm groups too? I'm part of cam.pm, as is Stephen. BooK is obviously part
of paris.pm, and Piers, a part of the infamous Buffy Worshippers...
Er, why obviously? It
/$/$/ while aeiouy=~/.?/g
I love this use of two different values of $ (which are equal, but not
the same)
--
Philippe BooK Bruhat
The shortest distance between two points is not always the safest.
(Moral from Groo The Wanderer #69 (Epic))
En réponse à [EMAIL PROTECTED]:
I knew BooK was an obfuscator specialist.
Well, thanks for the compliment. *blush*
I have not yet entered the course, mainly due to work issues,
but I already dreamt of this game tonight (thinking of false
solutions to the holes)... :-)
Yanick, I did not
: + - * / %
.. pops and print one item from the stack
= prints the whole stack
Enjoy,
--
Philippe BooK Bruhat
Even when the words are true, they may not speak the truth.
(Moral from Groo The Wanderer #70 (Epic))
En réponse à Patrick Gaskill [EMAIL PROTECTED]:
I, for one, joined FWP because of Santa's golf tournament, and because I
can't get enough of a golf fix anywhere else. So the more, the sooner,
the better. How else am I supposed to avoid work if I don't have a golf to
work on?
On the other
En réponse à Ariel Scolnicov [EMAIL PROTECTED]:
Robin Houston [EMAIL PROTECTED] writes:
It's interesting to try do it as a single regex. The shortest
I've found is:
/(?=[a-z].*[a-z].*[a-z]).*\d.*\d/
/(?=(.*[a-z])){3}(.*\d){2}/i
(you also need the i I guess).
But yours
an
(obfuscated or not) unlink for glob * line in it...
--
Philippe BooK Bruhat
Be careful when you take one side or the other. You could wind up in the
middle.(Moral from Groo The Wanderer #33 (Epic))
||last # 14
-p $.^11||last # 14
-p /11/last # 13 cheat!
And then I looked over Piers shoulder...
--
Philippe BooK Bruhat
History is made by the winners and written by those with the loudest voices
On Thu, 6 Dec 2001, Philip Newton wrote:
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?
Amelia is the name Paris.pm people gave to Programming Perl, 3rd ed.
Fido is the name
it,
even though I translated the whole chapter 3 in French. :-S
I am very curious to see what else than the obvious can be done for
rev.pl. And I wonder if shorter than the obvious is possible (I guess so).
--
Philippe BooK Bruhat
One lesson learned is never enough
35 matches
Mail list logo