From df1712c17c5560143ec64cc0823ffa02fd7561a8 Mon Sep 17 00:00:00 2001 From: spider-mario Date: Sat, 28 Jul 2012 12:20:46 +0200 Subject: The rewrite of ponysaylist.pl does not fail anymore with no parameters. --- ponysaylist.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ponysaylist.pl b/ponysaylist.pl index 0e2db56..0c0410c 100755 --- a/ponysaylist.pl +++ b/ponysaylist.pl @@ -16,7 +16,7 @@ use feature qw(say); use integer; use List::Util qw(max); -my $scrw = shift @ARGV; +my $scrw = shift @ARGV // 1; for (@ARGV) { # Format names from ponyies names @@ -24,7 +24,7 @@ for (@ARGV) { s/_(.*)/\t($1)/; } -my $maxw = max map {length} @ARGV; +my $maxw = max 1, map {length} @ARGV; my $cols = max 1, (($scrw + 2) / ($maxw + 2)); -- cgit