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

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!