Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Juerd (1796)

Juerd
  (email not shown publicly)
http://juerd.nl/
+ -

  Comment: Eval (Score 1) on 2009.12.20 20:53

by Juerd on 2009.12.20 20:53 (#71427)
Attached to: What's your coolest Perl one-liner?

Still my favorite is:

perl -ple'$_=eval'

It's a pure REPL. It evaluates every line from stdin and outputs whatever they evaluate to. It has many uses, but most of the time it's "just" a very powerful calculator.

Read More 7 comments
Comments: 7
+ -

  Comment: A big thank you! (Score 1) on 2009.04.08 4:01

by Juerd on 2009.04.08 4:01 (#68056)
Attached to: DBD::SQLite and Unicode

Hi, thanks for fixing this bug. I can now get rid of many hacky utf8::upgrade calls :).

Does this also encode/upgrade the query itself, in case someone uses a literal value instead of a placeholder? I forgot to add that to the test.

Read More 3 comments
Comments: 3
+ -

  Comment: Antique Perl (Score 1) on 2009.01.16 21:15

by Juerd on 2009.01.16 21:15 (#66905)
Attached to: Modern Perl

Modern Perl is a good concept, but antique Perl style also needs explanation. Only very few programmers never have to maintain the old stuff.

A while ago I started a wiki page for this, http://www.perlfoundation.org/perl5/index.cgi?ancient_perl but I never got around to finishing that.

Also, while old stays old, the definition of "modern" is constantly changing. It'd be a bold move, especially in print, but I think this book needs a timestamp ("Modern Perl 2009") in the title, and constant (biennial?) review.

Read More 39 comments
Comments: 39
+ -

  Comment: Overwriting the array in place (Score 1) on 2009.01.12 15:51

by Juerd on 2009.01.12 15:51 (#66812)
Attached to: No Fisher-Yates Shuffle In Perl 6

@array.=pick(*);

This might even be optimized and actually shuffle the elements within the array.

Read More 6 comments
Comments: 6
+ -

  Comment: Same for strict? (Score 1) on 2009.01.01 22:33

Unfamiliar with implementation and performance details, upon reading about ProhibitUselessNoCritic I was immediately reminded of an old idea I had for "no strict": warn (if warnings are enabled) if the code doesn't eval anything and is strict compliant.

Read More 2 comments
Comments: 2