QuoteGC39XWB,2012-03-17T10:33Z,Found it,""
QuoteFound: 17.03.2012
1 2 3 4 5 6 7 8
my $foundstring = get_foundtime_from_garmin($gcid); print " DEBUG add_new_cache 4: return value from get_foundtime_from_garmin: $foundstring\n\n\n"; if ($foundstring eq "n/a") { # need to read the time from the note.txt file my $notetxtfile = $gcdir . "/found/" . $currentdir . "/note.txt"; $foundstring = read_date_from_notetxt($notetxtfile); }
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
# STEP 2.5 --> read_date_from_notetxt sub read_date_from_notetxt { my $file = shift; read_config $file => my %notetxtrecord; my $datestring = $notetxtrecord{''}{'Found'}; print "DATESTRING: $datestring\n"; # FIXME: this is not working right now my @datearray; @datearray = split(/./,$datestring); print "Date-Array 2nd position: "; print $datearray[2]; print "\n"; my $timestring = $datearray[2]."-".$datearray[1]."-".$datearray[0]."T00:00Z"; print $timestring."\n\n"; return $timestring; }
QuoteLooking up Der_Rabe_GC39XWB in the SQLite database...: not found!
Hopping now into add_new_cache function...
DEBUG add_new_cache 1: starting function add_new_cache
DEBUG add_new_cache 2: Full path to the file: /home/marcus/Dokumente/Geocaching/gcdir2/found/Der_Rabe_GC39XWB/cache.txt
DEBUG add_new_cache 3: GC39XWB
DEBUG add_new_cache 4: return value from get_foundtime_from_garmin: n/a
DATESTRING: 17.03.2012
Use of uninitialized value in print at /home/marcus/bin/gcfounds2mysql.pl line 200.
Date-Array 2nd position:
Use of uninitialized value $datearray[2] in concatenation (.) or string at /home/marcus/bin/gcfounds2mysql.pl line 202.
Use of uninitialized value in concatenation (.) or string at /home/marcus/bin/gcfounds2mysql.pl line 202.
Use of uninitialized value in concatenation (.) or string at /home/marcus/bin/gcfounds2mysql.pl line 202.
--T00:00Z
QuoteZeile 193: (Schwerer Fehler) Type of arg 2 to Config::Std::Hash::read_config must be one of [%$] (not reference constructor), near "%notetxtrecord;"
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#!/usr/bin/perl use strict; use warnings; use Data::Dumper; sub test1 (\[%]) { print Dumper(@_); } sub test2 (\[@]) { print Dumper(@_); } sub test3 (\[$]) { print Dumper(@_); } my %hash=(test1=>1,test2=>1); test1(%hash); my @array=qw(test1 test2); test2(@array); my $scalar='test3'; test3($scalar);