diff scan.pl @ 48:96ee35378696

modified for searching configuration files
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Sat, 18 Oct 2008 21:23:09 +0800
parents 5849b6fdc76c
children 0fa9cd836e1e
line wrap: on
line diff
--- a/scan.pl	Fri Oct 17 14:06:31 2008 +0800
+++ b/scan.pl	Sat Oct 18 21:23:09 2008 +0800
@@ -8,7 +8,10 @@
 {
     my ($island, @cities) = @_;
 
-    die ("empty cities list.\n") if ($#cities == -1);
+    if ($#cities == -1) {
+        warn ("empty cities list.\n");
+        return;
+    }
 
     foreach my $city (@cities)
     {