Slash Boxes
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

What I like most about perl 5.10

Displaying poll results.
  9% 30 votes
state variables
0% 2 votes
// (defined or)
  19% 61 votes
~~ (smart match)
  9% 31 votes
regexp improvements
  9% 28 votes
switch statement (given, when)
  9% 29 votes
all of the above
  36% 115 votes
none of the above (write-in)
  4% 15 votes
311 total votes.
[ Voting Booth | Other Polls | Back Home ]
  • Don't complain about lack of options. You've got to pick a few when you do multiple choice. Those are the breaks.
  • Feel free to suggest poll ideas if you're feeling creative. I'd strongly suggest reading the past polls first.
  • This whole thing is wildly inaccurate. Rounding errors, ballot stuffers, dynamic IPs, firewalls. If you're using these numbers to do anything important, you're insane.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • I voted "none of the above" because my favourite thing is the way unitialised variables are now named, whenever possible:

    perl -we 'print $ENV{pie}'
    Use of uninitialized value $ENV{"pie"} in print at -e line 1.

    It's already saved me time today. Thanks Dave [] for making this work.

    • That's a great feature, and I definitely think it should've made the list, as it's my number two feature. It's close to //, but I just have too much perl 5 code which says defined $foo ? $foo : $bar.

      I think I'd probably rate the proper reporting of uninitialized variables higher, except I've done without for so long, I rarely encounter that problem anymore. But the defined check warts have remained year after year - it isn't problem code to be fixed, except that it bothers my code sense and I'm just tired

  • Hard call, though I went for the regexp improvements. I'll probably use say only in one-liners, I don't think I will use state variables, I use defined-or since 5.8.0, so that is not new for me in 5.10, and the smart match will probably be used, most likely in combination with switches.
    Enjoy, have FUN! H.Merijn
  • has anybody figured out if given has the same goodness es in perl 6, read: leaves the given block immidietly when stepping out of a when block, so you can write things between the when block and write even more tricky code.
  • My favourite 5.10 moment was when I had finished writing a program [] to do some re-ordering, and realising that I was sending in data to Perl's sort which was nearly already sorted - the worst kind of input to the quicksort algorithm - that Perl 5.10 has a pragma to make it use the sort I wanted. Nice.

  • State variables and defined-or have changed the way I code Perl :). Yay for small, important changes between minor versions!
  • I voted for say(). It's only a really small improvement, but the one that saved me the most typing.

    Second place is //.

    State variables are very cool, but it really takes for me to actually use them, because most programming languages I worked with so far didn't have something similar.

  • I like having a defined-or operator, but am not happy about its token. Yet another use of the slash, and one resembling an alien comment delimiter at that, ugh!