diff options
-rwxr-xr-x | lyra.pl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lyra.pl b/lyra.pl index 3aad720..a4e17a1 100755 --- a/lyra.pl +++ b/lyra.pl @@ -49,7 +49,8 @@ sub random { say $fortunes[ rand @fortunes ]; # Print random fortune. } -if ( $dispatch{ $ARGV[0] } ) { +if ( $ARGV[0] + and $dispatch{ $ARGV[0] } ) { $dispatch{ $ARGV[0] }->(); } elsif ( scalar @ARGV == 0 ) { HelpMessage(); |