--- a/lib/Panotools/Photos.pm
+++ b/lib/Panotools/Photos.pm
@@ -164,15 +164,15 @@
         my $et = $image->{exif}->{ShutterSpeedValue} || $image->{exif}->{ExposureTime} || $image->{exif}->{ShutterSpeed} || 0;
         $speeds->{$et} = 'TRUE';
     }
-    return [sort {_longer ($b, $a)} keys (%{$speeds})];
+    return [sort {_longer ($b, $a)} keys %{$speeds}];
 }
 
 sub _longer
 {
-    my ($a, $b) = @_;
-    if ($a =~ /^1\/([0-9]+)$/) {$a = 1 / $1};
-    if ($b =~ /^1\/([0-9]+)$/) {$b = 1 / $1};
-    return 0 if ($b > $a);
+    my ($A, $B) = @_;
+    if ($A =~ /^1\/([0-9]+)$/) {$A = 1 / $1};
+    if ($B =~ /^1\/([0-9]+)$/) {$B = 1 / $1};
+    return 0 if ($B > $A);
     return 1;
 }