String

A

Arun

What is wrong with this string

$send_data = (print strftime "::DATA::123456789101112,%d.%m.%y,%H:%M:
%S,13.0076367,77.5489267,0,933.4,AirTel,31,0", gmtime);
 
J

Jürgen Exner

Arun said:
What is wrong with this string

$send_data = (print strftime "::DATA::123456789101112,%d.%m.%y,%H:%M:
%S,13.0076367,77.5489267,0,933.4,AirTel,31,0", gmtime);

Nothing as far as I can tell.

Unfortunately you don't tell us what _you_ expect $send_data to contain
versus what you are observing it to contain. Therefore there is no way
of telling if your system or your expectations are wrong.

jue
 
D

Dr.Ruud

Arun schreef:
What is wrong with this string

$send_data = (print strftime "::DATA::123456789101112,%d.%m.%y,%H:%M:
%S,13.0076367,77.5489267,0,933.4,AirTel,31,0", gmtime);

There is nothing wrong with that string. If print succeeds, then it
returns 1.

You probably meant this:

$data = strftime(

"::DATA::123456789101112,%d.%m.%y,%H:%M:%S,13.0076367,77.5489267,0,933.4
,AirTel,31,0",
gmtime,
);
 
L

Leon Timmermans

What is wrong with this string

$send_data = (print strftime "::DATA::123456789101112,%d.%m.%y,%H:%M:
%S,13.0076367,77.5489267,0,933.4,AirTel,31,0", gmtime);

Your intentions aren't clear to me at all. Do you want to print the
string or save it in $send_data? And why the parentheses?

Regards,

Leon Timmermans
 
J

Jürgen Exner

smallpond said:
It doesn't work.

Actually it does work. You will get a
Unquoted string "strftime" may clash with future reserved word
when trying to print that filehandle, but that's opnly a warning.
Otherwise $send_data is assigned '1' just as I would have expected.

Now, the OP might have expected something different, but unfortunately
he forgot to tell us what he expected to happen. As well as what
deviating behaviour he was observing.

jue
 
P

patrick

What is wrong with this string

$send_data = (print strftime "::DATA::123456789101112,%d.%m.%y,%H:%M:
%S,13.0076367,77.5489267,0,933.4,AirTel,31,0", gmtime);

$send_data = "::DATA::123456789101112," . strftime ("%d.%m.%y,%H:%M:
%S", gmtime) . "13.0076367,77.5489267,0,933.4,AirTel,31,0";


====>Patrick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,152
Latest member
LorettaGur
Top