Skip to content

Instantly share code, notes, and snippets.

View esobchenko's full-sized avatar

Eugen Sobchenko esobchenko

  • Odessa, Ukraine
View GitHub Profile
my $sorted_results = [
sort
{
( $a, $b ) = ( $b, $a ) if $order eq 'desc';
$a->{$sortby} <=> $b->{$sortby} || $a->{$sortby} cmp $b->{$sortby}
} @$results
];
#!/usr/bin/env perl
use strict;
use warnings;
use MojoX::Redis;
my $redis1 = MojoX::Redis->new();
$redis1
->sadd ( "set1" => "foo" )