Mercurial > eagle-eye
comparison 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 |
comparison
equal
deleted
inserted
replaced
46:9466964ae5bb | 48:96ee35378696 |
---|---|
6 package main; | 6 package main; |
7 sub saveCities | 7 sub saveCities |
8 { | 8 { |
9 my ($island, @cities) = @_; | 9 my ($island, @cities) = @_; |
10 | 10 |
11 die ("empty cities list.\n") if ($#cities == -1); | 11 if ($#cities == -1) { |
12 warn ("empty cities list.\n"); | |
13 return; | |
14 } | |
12 | 15 |
13 foreach my $city (@cities) | 16 foreach my $city (@cities) |
14 { | 17 { |
15 $city->{island} = $island; | 18 $city->{island} = $island; |
16 $city->{'time'} = time; | 19 $city->{'time'} = time; |