News for hackers. Stuff that matters.
Re:Ask HN: Why do people consider Ruby better than Perl or v... by perigrin on Tuesday January 11, 2011 @07:28PM (#2094283)
And one that doesn't like autobox would say:

    use 5.12.2; # enables modern features
    my $x = 'Apple Carrot Banana';
    my @y = sort split ' ', $x;

    say @y > 2 ? "we've got ${\scalar @y} elements!" 
               : 'insufficient elements. fail.';
Not everything needs to be an Object. Not every call needs to be a method call. Some people think better with procedures, some people think better with objects.

One of the reasons I personally like Perl is I can use which ever one is appropriate to the problem domain.

Edit: forgot the `sort` call.

There are no comments on this comment yet.