1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
RemovalCheck {
my $RemovalBlack = "off";
my $RemovalBrown = "off";
my $RemovalBlue = "off";
my $RemovalYellow = "off";
my $RemovalToxic = "off";
my $RemovalPaper = "off";
my $RemovalGreen = "off";
my $rcal= fhem("get Abfall text all 4");
my @events = split ("\n", $rcal);
my $tomorrow = strftime "%d.%m.%y", localtime(time + 86400);
foreach my $event (@events)
{
my @values = split(" ", $event);
if ($values[0] eq $tomorrow)
{
if ($values[3] eq "Restmüll") {$RemovalBlack = "on"}
elsif ($values[3] eq "Biomüllabfuhr") {$RemovalBrown = "on"}
elsif ($values[3] eq "Papiertonne") {$RemovalBlue = "on"}
elsif ($values[3] eq "Gelber") {$RemovalYellow = "on"}
elsif ($values[3] eq "Schadstoffsammlung") {$RemovalToxic = "on"}
elsif ($values[3] eq "Papiersammlung") {$RemovalPaper = "on"}
elsif ($values[3] eq "Grünabfallsammlung") {$RemovalGreen = "on"}
}
}
fhem("set RemovalBlack $RemovalBlack");
fhem("set RemovalBrown $RemovalBrown");
fhem("set RemovalBlue $RemovalBlue");
fhem("set RemovalYellow $RemovalYellow");
fhem("set RemovalToxic $RemovalToxic");
fhem("set RemovalPaper $RemovalPaper");
fhem("set RemovalGreen $RemovalGreen");
return;
}
1
2
3
4
15.02.16 06:00 Abfuhrtermin Biomüllabfuhr am 15.02.2016
22.02.16 06:00 Abfuhrtermin Restmüll am 22.02.2016
23.02.16 06:00 Abfuhrtermin Papiertonne am 23.02.2016
29.02.16 06:00 Abfuhrtermin Biomüllabfuhr am 29.02.2016
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2016.02.14 10:14:50 3: RemovalCheck return value: No such class RemovalCheckevents at (eval 29356) line 11, near ";
my RemovalCheckevents"
syntax error at (eval 29356) line 11, near "my RemovalCheckevents ="
No such class RemovalCheckvalues at (eval 29356) line 16, near "{
my RemovalCheckvalues"
syntax error at (eval 29356) line 16, near "my RemovalCheckvalues ="
Global symbol "@values" requires explicit package name at (eval 29356) line 18.
Global symbol "@values" requires explicit package name at (eval 29356) line 20.
Global symbol "@values" requires explicit package name at (eval 29356) line 21.
Global symbol "@values" requires explicit package name at (eval 29356) line 22.
Global symbol "@values" requires explicit package name at (eval 29356) line 23.
Global symbol "@values" requires explicit package name at (eval 29356) line 24.
Global symbol "@values" requires explicit package name at (eval 29356) line 25.
Global symbol "@values" requires explicit package name at (eval 29356) line 26.
Bareword "RemovalCheckevents" not allowed while "strict subs" in use at (eval 29356) line 14.
1 2 3 4 5 6 7
#! /usr/bin/perl use strict; use warnings; use 5.12.0 my @array = ( 1,2,3 ); say join "\n", @array;
1
2
3
4
5
6
syntax error at t.pl line 6, near "use 5.12.0
my "
Global symbol "@array" requires explicit package name at t.pl line 6.
Global symbol "@array" requires explicit package name at t.pl line 9.
Execution of t.pl aborted due to compilation errors.