I am running a perl script that calls a bash script with arguments. It reads a string from a socket, splits it and saves it to an array. This is how such a string looks:
22.12.13 20:21:12;RING;0
The first array element is a date, which is passed as an argument to a bash script. In the bash script, the arguments are passed on to curl as POST data.
I don't know how to handle the space between date and time in the string. The curl is executed correctly and the server responds with OK (200). However it's only the first part (up to the space) that is passed as POST data. The time is missing. curl gives the folowing error:
curl: (6) Couldn't resolve host '20:21'
These are the relevant lines from the scripts:
#perl script
my $EXTPRO="/path/to/script.sh";
if ($_ =~ /RING/){
my @C = split(/;/);
my @args = ($EXTPRO, $nr, $C[0], "String");
system(@args);
#bash script:
curl http://url.com/add -F foo=$3 -F date=$2 -F foobar=$1