The SAY DIGITS function in Perl does not read from a variable that contains the STDOUT result from a command line executed in Perl, but it works when i assign any value to the variable.
#!/usr/bin/perl
use strict;
my $Hour = qx(date "+%I");
print "SAY DIGITS $Hour \"\"\n";
The extensions.conf file:
exten => 222,1,Answer()
exten => 222,2,AGI(time.sh)
exten => 222,3,Hangup()
The code should tell the caller the current time. simple as that.