#!/usr/bin/perl
use strict;
print "content-type: text/plain\n\n";
print `who`;
print `locale`;
yehuda pts/2 Jul 1 17:37 (pool-xxxxxx.washdc.fios.verizon.net)
LANG=
LANGUAGE=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
content-type: text/plain
yehuda pts/2 2016-07-01 17:37 (pool-xxxxxx.washdc.fios.verizon.net)
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
Server version: Apache/2.4.10 (Debian)This seems like it should be simple but manual pages and searching have not shown me an answer yet. Reduced it to as simple as I can, I don't understand why the date format is different in each.
#!/usr/bin/perl
use strict;
print "content-type: text/html\n\n";
print `who`;When I call it up in a web browser I get
rob pts/1 Jul 1 12:28 (192.x.x.x)The same script on a command line via ssh I get:
prompt$ perl tryme.cgi
content-type: text/html
rob pts/1 2016-07-01 12:28 (192.x.x.x)
--Rob