« Antwort #4 am: 26 Februar 2018, 21:29:56 »
Parameters work like that:
sub mySub($$$)
{
my($Param1, $Param2, $Param3) = @_;
if($Param1 eq "Hello")
{
}
if(Param2 == 3)
{
}
Log3(undef, 3, "Param3: $Param3);
}
calling like:
{mySub("Value1", Value2, Value3)}
in WebCmd or Notify or or or...
The number of '$' corresponds with the number of parameters you need.
The same for my($x1, $x2, $x3, ...) = @_;
Calling system functions goes like:
qx(SystemCmd) or system("SystemCmd") when using in perl or just put it in (" ") (if I'm not wrong) when using directly from fhem...
(
http://www.perlmonks.org/?node_id=928192)
If this is solved then you could mark the thread as solved: rename e.g. [solved] Grabbing and sending webcam pic via telegram problem
Have fun, Joachim
« Letzte Änderung: 26 Februar 2018, 21:34:35 von MadMax-FHEM »

Gespeichert
FHEM 5.9 PI3: HM-CFG-USB, 40x HM, ZWave-USB, 6x ZWave, EnOcean-PI, 3x EnOcean, HUE, CO2, ESP-Multisensor, FireTV, KODI, alexa-fhem, ...
FHEM 5.9 PI2: HM-CFG-USB, 25x HM, ZWave-USB, 4x ZWave, EnOcean-PI, 3x EnOcean, KODI, ha-bridge, ...
FHEM 5.9 PI3 (Test): HM-MOD-PCB, Snips, Google Home, ...