Grokbase Groups Perl fwp
FAQ

Search Discussions

441 discussions - 4,214 posts

  • http://www.occamobile.com/zhvrm/htdza/hsp/gr/vo 3/15/2013 10:26:49 AM . Andrew Savige
    Andrew SavigeAndrew Savige
    Mar 15, 2013 at 9:27 am
    Mar 15, 2013 at 9:27 am
  • so you want to check every element for oddity of its value, not its index, right? @list = grep{$_%2}@array; cheers, 0--gg-
    Moritz, GeorgMoritz, Georg
    May 16, 2012 at 11:51 am
    May 16, 2012 at 11:51 am
  • Hi, I'm using this code to get a list of only the odd elements of an array. The resulting list must have the same order as the array. map { state $f; ($_) x (++$f%2) } @array; I'm looking for advice ...
    Damien krotkineDamien krotkine
    May 16, 2012 at 11:16 am
    May 19, 2012 at 10:19 am
  • The story behind Acme::Bleach and its many cousins: http://www.perlmonks.org/?node_id=967004 Feedback and anecdotes welcome. Thanks, /-\
    Andrew SavigeAndrew Savige
    May 2, 2012 at 12:56 pm
    May 2, 2012 at 12:56 pm
  • So, A few years back, I started to write a manual page about Perl secret operators, with the goal of getting it into the official Perl documentation at some point. Somehow I got interested in that ...
    Philippe Bruhat (BooK)Philippe Bruhat (BooK)
    Mar 16, 2012 at 11:44 am
    Apr 7, 2012 at 1:26 am
  • Hi, While doing some tests/research on secret operators, I stumbled upon this one in my one-liners: ~~< Obviously, this should be named "the sperm operator". It's only useful in list context. Just ...
    Philippe Bruhat (BooK)Philippe Bruhat (BooK)
    Mar 14, 2012 at 11:36 am
    Mar 16, 2012 at 11:43 am
  • perl -le '#!perl -s' -e'$a=1;print+"perl -le \x27#!perl -s\x27 -e\x27\$a=${q\e$a\}\x27"' -- Father Chrysostomos --- via perlbug: queue: perl5 status: new ...
    Father Chrysostomos via RTFather Chrysostomos via RT
    Jan 4, 2012 at 7:41 am
    Jan 4, 2012 at 7:41 am
  • Begin forwarded message: Date: Mon, 26 Dec 2011 11:13:48 +0200 From: Shlomi Fish <shlomif@shlomifish.org To: golf@perl.org Subject: New Golf Server - http://golf.shinh.org/ Hi all, there's a new Golf ...
    Shlomi FishShlomi Fish
    Dec 26, 2011 at 9:16 am
    Dec 26, 2011 at 9:16 am
  • It is kind of obvious when you unfold the loop, but what is the best abuse of this very deprecated perl feature? //Makholm #!/usr/bin/perl $japh = pack "C*", 113, 123, 32 .. 122, 125; $_ = q(49 6 8 7 ...
    Peter MakholmPeter Makholm
    Nov 30, 2011 at 2:05 pm
    Nov 30, 2011 at 2:05 pm
  • hi! Just a little JAPH for convert decimal to binary.... Feel free to comment it ;) ---------------------------------------------------------------- #!/usr/bin/perl use strict; use warnings; eval ...
    Sandro CAZZANIGASandro CAZZANIGA
    Nov 16, 2011 at 1:26 pm
    Nov 18, 2011 at 8:41 pm
  • This is something people often ask for. The stock answer is that regexes aren't the correct solution, but really it's not so hard. This validates Gregorian MM/DD/CCYY dates, for example: qr#^ (?: ...
    Yitzchak Scott-ThoennesYitzchak Scott-Thoennes
    Nov 15, 2011 at 7:01 pm
    Nov 16, 2011 at 10:15 am
  • Wow, nice to se something happening on this list. :) Would anyone like to rate my old JAPH below? (Don't know how to rate it, but maybe it can be fun to figure that out... ;) - Salve (Oslo.pm) -- ...
    Salve J NilsenSalve J Nilsen
    Nov 10, 2011 at 2:14 pm
    Dec 7, 2011 at 8:47 pm
  • http://codegolf.stackexchange.com/questions In any language but ... a ---------------------- Andy Bach Systems Mangler Internet: andy_bach@wiwb.uscourts.gov Voice: (608) 261-5738, Cell: (608) ...
    Andy_bachAndy_bach
    Nov 9, 2011 at 6:21 pm
    Nov 9, 2011 at 6:21 pm
  • Hi, I'm new to this list and I'll send some JAPH's and little code, and I will happy to read yours. :) Cheers.
    Sandro CAZZANIGASandro CAZZANIGA
    Nov 9, 2011 at 5:03 pm
    Nov 11, 2011 at 9:06 am
  • { my $match = eval '$_= q laurel;y subcostalis;s paperclip;m elite;$&'; is( $match, 'lit', 'alpha delimiters are allowed' ); } The fwp challenge is, get out your simple regexen and pipes from ...
    David NicolDavid Nicol
    Sep 4, 2009 at 9:38 pm
    Sep 4, 2009 at 9:38 pm
  • Seems like this could be fun/golf ----- Forwarded by Andy Bach/WIWB/07/USCOURTS on 08/13/2009 11:57 AM ----- I am using Active Perl 5.8.8. and Perl Dev Kit 7.0. I'm writing some code that ...
    Andy_bachAndy_bach
    Aug 13, 2009 at 4:58 pm
    Aug 14, 2009 at 5:07 am
  • Did you notice that this (x=!) is a secret operator of the same family as the "screwdriver operators" discovered by Dmitry Karasik and showed some time ago (November 2007) on fwp. Actually, Dmitry ...
    Philippe Bruhat (BooK)Philippe Bruhat (BooK)
    Jun 24, 2009 at 9:35 pm
    Jun 24, 2009 at 9:35 pm
  • Hello, I would like to introduce the Investment Committee. I represent Investment Group that is intended to provide with life changing data and services. Investment programs can generate you no risk ...
    Benita BrysonBenita Bryson
    Jun 22, 2009 at 9:35 pm
    Jun 22, 2009 at 9:35 pm
  • the "fun with perl" mailing list doesn't still exist, does it? there's also my $BeerOrPie; sub BeerOrPie::TIESCALAR { bless \(my $x), 'BeerOrPie' }; sub BeerOrPie::FETCH { rand() < 0.5 ? 'pie' : ...
    David NicolDavid Nicol
    Sep 25, 2008 at 8:08 pm
    Sep 29, 2008 at 12:01 pm
  • someone posted (and it wasn't homework) for an easy way to get all possible combos of YN (5 chars so 32 answers). he got some basic multiline answers but i think it makes for a great golf problem. ...
    Uri GuttmanUri Guttman
    Mar 31, 2008 at 10:50 pm
    Apr 11, 2008 at 9:26 am
  • Hi, while doing some research for a talk on Perl secret operators, I tried to find who first coined the term "secret operator". I found a post from Greg Allen on February 2004 on this very list ...
    Philippe Bruhat (BooK)Philippe Bruhat (BooK)
    Mar 20, 2008 at 12:28 am
    Mar 20, 2008 at 7:32 pm
  • ^([Pp]([Oo][Ss][Tt])?[.\s]*[Oo]([Ff][Ff][Ii][Cc][Ee])?[.\s]*[Bb][Oo] [Xx])|[Pp][Oo]([Bb]|[Xx]|[Dd][Rr][Aa][Ww][Ee][Rr]|[Ss][Tt][Oo][Ff][Ff] [Ii][Cc][Ee]|[ ...
    Uri GuttmanUri Guttman
    Jan 7, 2008 at 10:06 pm
    Jan 15, 2008 at 5:29 am
  • i have had the pleasure of doing code review for a client and finding this gem: sub new { my $class = shift; my %params = (@_); my $self = {}; my $package = caller(); for my $key ( keys %params ) { ...
    Uri GuttmanUri Guttman
    Dec 9, 2007 at 6:43 am
    Dec 15, 2007 at 2:24 am
  • I haven't written any Perl for fun in a while, but I recently entertained myself a bit by writing a Boggle puzzle solver in Ruby: http://blog.footle.org/2007/12/05/cheating-for-fun/ I'm not sure if ...
    Brad GreenleeBrad Greenlee
    Dec 6, 2007 at 5:44 pm
    Dec 7, 2007 at 6:12 am
  • Good news everyone! Excuse exclamation marks abound, but this message is all about a set of new secret operators I thought of, all based on the exclamation sign. The boolean negation is not really ...
    Dmitry KarasikDmitry Karasik
    Nov 30, 2007 at 8:27 am
    Nov 30, 2007 at 9:36 pm
  • hi all, thanks for the help with hash ideas. the class went pretty well today with even the most experienced perl coder learning something new about hash slices. i did some editing of more examples ...
    Uri GuttmanUri Guttman
    Nov 29, 2007 at 5:29 am
    Nov 29, 2007 at 7:16 pm
  • Hi, Just thought I should share this with the FWP crowd. I had to do something special with the first line of a file, before running the whole while(< ) loop on it. I ended up with this: ...
    Philippe Bruhat (BooK)Philippe Bruhat (BooK)
    Nov 28, 2007 at 4:16 pm
    Dec 1, 2007 at 1:47 am
  • too long has this list been quiet. but i have a fun question. i am writing up slides for an all about hashes class. one goal i have is to list and explain as many different uses for hashes as ...
    Uri GuttmanUri Guttman
    Nov 23, 2007 at 6:13 pm
    Nov 26, 2007 at 1:01 am
  • $ perl test.pl 1 11 21 1211 111221 312211 13112221 1113213211 31131211131221 13211311123113112211 11131221133112132113212221 3113112221232112111312211312113211 ...
    Anthony DeRobertisAnthony DeRobertis
    Oct 11, 2007 at 9:14 pm
    Oct 11, 2007 at 11:39 pm
  • From a chicago PM list a 'golfed' perl BF interpreter: ----- Forwarded by Andy Bach/WIWB/07/USCOURTS on 02/13/2007 01:06 PM ----- Been there, done that [wrote the BF interpreter]. Here's a mildly ...
    Andy_bachAndy_bach
    Feb 13, 2007 at 7:10 pm
    Feb 13, 2007 at 7:10 pm
  • I've used xinetd to set up a test nameserver on port 1024. Here's the Net::DNS Perl I'm using to say (falsely) that news.yahoo.com resolves to 10.1.2.3 with a TTL of 1 day: $res = Net::DNS::Packet- ...
    Kelly JonesKelly Jones
    Nov 26, 2006 at 6:56 am
    Nov 28, 2006 at 2:00 am
  • hi all, i have released Template::Simple to cpan so get it from there and start rendering! thanx, uri -- Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com --Perl Consulting, ...
    Uri GuttmanUri Guttman
    Sep 25, 2006 at 4:16 pm
    Sep 25, 2006 at 4:16 pm
  • Hi All, Here's a wee bit of fun I've been having. Its sort of a golf problem, but not. All of the perl quine [*1] examples I've seen [*2] have large amounts of punctuation. I've managed to get it ...
    McGlinchy, AlistairMcGlinchy, Alistair
    Sep 19, 2006 at 10:34 am
    Sep 20, 2006 at 11:48 pm
  • Here's a distillation of something that just bit me, behaves the same on 5.6.1 and 5.8.5. Observe the following program: for (1..2) { print_file($0); } for (qw(one two)) { print_file($0); } sub ...
    Peter ScottPeter Scott
    Sep 13, 2006 at 4:20 pm
    Sep 24, 2006 at 12:58 pm
  • hi all, i have gotten template::simple to a prerelease state. it has all of the required features coded, tested and documented. i don't want to mung it much more before i release it. as you can read ...
    Uri GuttmanUri Guttman
    Sep 12, 2006 at 5:02 am
    Sep 12, 2006 at 5:02 am
  • That was one of the deleted attempts. Hmm, let me refactor… my %copy = %$tmpls; $_ = \( ref $_ eq 'SCALAR' ? "$$_" : "$_" ) for values %copy; @{$self- {templates}}{ keys %copy } = values %copy; Hmm, ...
    Aristotle PagaltzisAristotle Pagaltzis
    Sep 8, 2006 at 2:42 pm
    Sep 14, 2006 at 7:36 am
  • this line of my code grew to its present form which i find amusing. @{$self- {templates}}{ keys %{$tmpls} } = map ref $_ eq 'SCALAR' ? \"${$_}" : \"$_", values %{$tmpls} ; discuss amongst yourselves. ...
    Uri GuttmanUri Guttman
    Sep 7, 2006 at 7:29 am
    Sep 8, 2006 at 1:36 pm
  • Hello list, I have a problem that I've solved with some logic and a few lines of code but I'm sure that there is a good regexp that can do the job. So I ask the regexp gurus of this list whether they ...
    Alexandre JoussetAlexandre Jousset
    Aug 28, 2006 at 4:13 pm
    Aug 29, 2006 at 9:32 am
  • I just abused it further, check it out: http://www.perlmonks.org/index.pl?node_id=562735 Regards, -- #Aristotle *AUTOLOAD=*_;sub _{s/(.*)::(.*)/print$2,(",$\/"," ")[defined wantarray]/e;$1}; &Just- ...
    Aristotle PagaltzisAristotle Pagaltzis
    Jul 20, 2006 at 11:18 pm
    Jul 20, 2006 at 11:18 pm
  • 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 the series of films "Baby ...
    Philippe "BooK" BruhatPhilippe "BooK" Bruhat
    Jul 7, 2006 at 3:34 pm
    Jul 13, 2006 at 5:10 pm
  • M I was digging through some old code and came across a proof that I had done M that you can swap two numbers in place (i.e. without using an external M temporary value). M Of course, in Perl, we can ...
    DeRykus, Charles EDeRykus, Charles E
    Jun 23, 2006 at 10:26 pm
    Jun 23, 2006 at 10:26 pm
  • I was digging through some old code and came across a proof that I had done that you can swap two numbers in place (i.e. without using an external temporary value). Of course, in Perl, we can just do ...
    Michael R. WolfMichael R. Wolf
    Jun 23, 2006 at 8:39 pm
    Jun 25, 2006 at 9:41 am
  • Sudoku solvers are old hat, of course, but this one is a bit different: it's a regexp. I suppose someone may have done this before, but if so, I haven't seen it. It's grossly inefficient, of course, ...
    Ilmari KaronenIlmari Karonen
    Apr 20, 2006 at 2:05 pm
    May 17, 2006 at 3:03 pm
  • In trying to get something done a co-worker came up with this little regex: perl -e '$a="abcde"x200;$a=~s{((\w+?)(??{!$b{$^N}++?"(?=)":"(?!)"}))}{($1)}xg;print "$a\n";' Basically, it creates a simple ...
    Alan YoungAlan Young
    Feb 23, 2006 at 4:49 pm
    Feb 24, 2006 at 10:44 pm
  • Question came up elsewhere and via: http://www.creativyst.com/Doc/Articles/HT/Dell/DellNumb.htm we found Dell uses base 36 for its Service tags. You need the decimal for the automated phone access so ...
    Andy_bachAndy_bach
    Feb 22, 2006 at 7:10 pm
    Feb 23, 2006 at 7:46 am
  • Rob Kinyon wrote golfs ... Not sure I can ... certainly can't think of any useful way to use this but you golfers might. a Andy Bach, Sys. Mangler Internet: andy_bach@wiwb.uscourts.gov VOICE: (608) ...
    Andy_bachAndy_bach
    Jan 23, 2006 at 4:59 pm
    Jan 23, 2006 at 4:59 pm
  • This may be of interest to some: Puzzle: The Ham Cheese Sandwich cut. http://perlmonks.org/?node_id=509409
    Yitzchak Scott-ThoennesYitzchak Scott-Thoennes
    Nov 18, 2005 at 5:11 am
    Nov 18, 2005 at 5:11 am
  • For the amusement of all camels and llamas present, here's a code-review of Perlwar done by Uri. For the record, he sent it my way barely a few hours after the initial release, which speaks volumes ...
    Yanick ChampouxYanick Champoux
    Nov 2, 2005 at 2:18 am
    Nov 2, 2005 at 5:36 am
  • After way too long in the making, I am proud to announce that a first beta of Perlwar is finally available to the public. "Glad to hear that. But what is PerlWar?" PerlWar is loosely inspired by the ...
    Yanick ChampouxYanick Champoux
    Oct 17, 2005 at 1:52 am
    Oct 18, 2005 at 1:50 am
  • #!/usr/bin/perl $sn = "Your Aim Screename"; $pw = "Password"; use Net::AIM; $aim = new Net::AIM; $aim- debug(1); $conn = $aim- newconn(Screenname= $sn,Password= $pw) or die "Can't connect to AIM ...
    Adam GregoryAdam Gregory
    Aug 30, 2005 at 7:46 pm
    Aug 30, 2005 at 7:46 pm
Group Navigation
period‹ prev | Latest | first ›

Top users

Andrew Savige: 218 posts Schwern: 131 posts Aristotle Pagaltzis: 129 posts Abigail: 114 posts Uri Guttman: 103 posts Ronald J Kimball: 95 posts Sneex: 94 posts Bart Lateur: 92 posts BooK: 89 posts Stephen Turner: 78 posts Yitzchak Scott-Thoennes: 77 posts Jeff 'japhy/Marillion' Pinyan: 69 posts Yanick: 69 posts Bernie Cosell: 68 posts Ton Hospel: 66 posts Keith C. Ivey: 65 posts Piers Cawley: 65 posts Jonathan E. Paton: 58 posts Randal L. Schwartz: 49 posts Rick Klement: 49 posts
show more