[32844] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 4110 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jan 8 06:09:30 2014

Date: Wed, 8 Jan 2014 03:09:05 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 8 Jan 2014     Volume: 11 Number: 4110

Today's topics:
    Re: Apache log page counter? <rvtol+usenet@xs4all.nl>
    Re: Apache log page counter? <ben@morrow.me.uk>
    Re: Apache log page counter? <tuxedo@mailinator.com>
    Re: Apache log page counter? <tuxedo@mailinator.com>
    Re: Apache log page counter? <rweikusat@mobileactivedefense.com>
    Re: Apache log page counter? <ben.usenet@bsb.me.uk>
    Re: Apache log page counter? <hjp-usenet3@hjp.at>
    Re: Apache log page counter? <cwilbur@chromatico.net>
    Re: Apache log page counter? <tuxedo@mailinator.com>
    Re: Help with understanding references to subroutines <gravitalsun@hotmail.foo>
    Re: Help with understanding references to subroutines <rweikusat@mobileactivedefense.com>
    Re: Help with understanding references to subroutines <daves@orpheusmail.co.uk>
    Re: Perl Script for Reading STDF files (Teradyne Standa klimovitsky@gmail.com
    Re: Perl Script for Reading STDF files (Teradyne Standa <jurgenex@hotmail.com>
    Re: Perl Script for Reading STDF files (Teradyne Standa <uri@stemsystems.com>
    Re: Perl Script for Reading STDF files (Teradyne Standa <gravitalsun@hotmail.foo>
    Re: Question about language setting <hjp-usenet3@hjp.at>
    Re: Question about language setting <ben@morrow.me.uk>
    Re: Question about language setting <rweikusat@mobileactivedefense.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Sun, 05 Jan 2014 20:40:28 +0100
From: "Dr.Ruud" <rvtol+usenet@xs4all.nl>
To: Tuxedo <tuxedo@mailinator.com>
Subject: Re: Apache log page counter?
Message-Id: <52C9B52C.5050603@xs4all.nl>

On 2014-01-05 19:47, Tuxedo wrote:
> I would like to implement a web page counter to measure 'unique' visitors
> p/page and p/IP in 24 hour cycles, so if several visits to a particular
> page comes from a same IP in a 24 hours time frame, it counts as one
> visitor to that page. While if the same visitor comes back to the same
> page, say 25 hours later counting from his previous IP and page count, the
> count can increment for that page again. In reality, this may represent a
> repeat visitor or another visitor having been assigned the same IP.
>
> Depending on type of web traffic and overall rotating IPs cycles by
> different net connection service providers, this type of solution may at
> best provide a highly approximate overview of a number of unique visitors.
>
> The source data is rotating Apache access logs in the format:
> 192.114.71.13 - - [05/Jan/2014:19:10:19 +0100] "GET / HTTP/1.1" 302 186
> "http:.../ref_if_transmitted.html" "Mozilla, browser version etc...."
>
> Also, I prefer to avoid external services, free or otherwise, which do data
> collection or simply isn't what I need, not to mention they can slow a site
> down while connecting to their external servers unnecessarily sharing
> visitor data to third-parties using cookies etc., which in all defeats the
> general purpose of facilitating a positive user experience that should
> ideally help build up traffic in the first place....
>
> Any ideas, including home-grown open-source perl based logfile processing
> solutions, would be most welcome!

Many hundreds of visitors can share the same IP-nr.
Other visitors can have a fresh IP-nr for every request.

So you need to store some ID in the client-side cookie.
And store further details server-side (consider Apache Cassandra).

That client-side cookie-ID needs protection against tampering and 
duplication. Combine it with a browser fingerprint, and create a fresh 
ID if the fingerprint no longer matches good enough.

If you implement this all properly, you can use the factoids 
dynamically, meaning that you can make them directly influence the 
content of the served pages.

-- 
Ruud



------------------------------

Date: Sun, 5 Jan 2014 22:33:58 +0000
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Apache log page counter?
Message-Id: <m73ppa-2gc1.ln1@anubis.morrow.me.uk>


Quoth Tuxedo <tuxedo@mailinator.com>:
> I would like to implement a web page counter to measure 'unique' visitors 
> p/page and p/IP in 24 hour cycles, so if several visits to a particular 
> page comes from a same IP in a 24 hours time frame, it counts as one 
> visitor to that page. 
[...]
> 
> The source data is rotating Apache access logs in the format:
> 192.114.71.13 - - [05/Jan/2014:19:10:19 +0100] "GET / HTTP/1.1" 302 186 
> "http:.../ref_if_transmitted.html" "Mozilla, browser version etc...."

Doesn't sound too hard: parse the log lines, extract the IP, page and
timestamp, and throw away any pair that is less than 24h newer than an
equivalent pair. What have you tried so far?

Ben



------------------------------

Date: Mon, 6 Jan 2014 09:18:38 +0100
From: Tuxedo <tuxedo@mailinator.com>
Subject: Re: Apache log page counter?
Message-Id: <ladot0$4h9$1@news.albasani.net>

Ben Morrow wrote:

> 
> Quoth Tuxedo <tuxedo@mailinator.com>:
> > I would like to implement a web page counter to measure 'unique'
> > visitors p/page and p/IP in 24 hour cycles, so if several visits to a
> > particular page comes from a same IP in a 24 hours time frame, it counts
> > as one visitor to that page.
> [...]
> > 
> > The source data is rotating Apache access logs in the format:
> > 192.114.71.13 - - [05/Jan/2014:19:10:19 +0100] "GET / HTTP/1.1" 302 186
> > "http:.../ref_if_transmitted.html" "Mozilla, browser version etc...."
> 
> Doesn't sound too hard: parse the log lines, extract the IP, page and
> timestamp, and throw away any pair that is less than 24h newer than an
> equivalent pair. What have you tried so far?
> 
> Ben
> 

So far I've not tried anything. I'm just looking into and testing various 
off-the-shelf solutions, such as Webalizer.org, Analog.cx, W3Perl.com, 
Piwik.org etc. Perhaps some can do what I need, as well as much more....

Tuxedo


------------------------------

Date: Mon, 6 Jan 2014 09:59:16 +0100
From: Tuxedo <tuxedo@mailinator.com>
Subject: Re: Apache log page counter?
Message-Id: <ladr95$94b$1@news.albasani.net>

Tuxedo wrote:

[... ]

> So far I've not tried anything. I'm just looking into and testing various
> off-the-shelf solutions, such as Webalizer.org, Analog.cx, W3Perl.com,
> Piwik.org etc.

Anyone knows of other tried-and-tested systems, please post any links here.

Thanks,
Tuxedo



------------------------------

Date: Mon, 06 Jan 2014 13:12:35 +0000
From: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Subject: Re: Apache log page counter?
Message-Id: <87a9f9ntj0.fsf@sable.mobileactivedefense.com>

Ben Morrow <ben@morrow.me.uk> writes:
> Quoth Tuxedo <tuxedo@mailinator.com>:
>> I would like to implement a web page counter to measure 'unique' visitors 
>> p/page and p/IP in 24 hour cycles, so if several visits to a particular 
>> page comes from a same IP in a 24 hours time frame, it counts as one 
>> visitor to that page. 
> [...]
>> 
>> The source data is rotating Apache access logs in the format:
>> 192.114.71.13 - - [05/Jan/2014:19:10:19 +0100] "GET / HTTP/1.1" 302 186 
>> "http:.../ref_if_transmitted.html" "Mozilla, browser version etc...."
>
> Doesn't sound too hard: parse the log lines, extract the IP, page and
> timestamp, and throw away any pair that is less than 24h newer than an
> equivalent pair. What have you tried so far?

I'd like to second Dr Ruud on that -- just using the IPs is not a
suitable way to count visitors because loads and loads of networks used
by many users sharing one external IP exist, eg, all 'public access'
WiFi networks, all reasonably small corporate networks and all
households with more than one member using a device capable of 'acessing
the internet'. Also, I know from experience that some phone companies
put their customers into RFC1918-networks when using 3G (or 4G). Because
of this, referring to the number determined in this way as 'higly
approximative' is just a more scientifically sounding variant of
'totally boguse', ie, whatever the actual visitor number happens to be,
it is certainly not this number.

	http://hitchhikers.wikia.com/wiki/Bistromatics

see also

	I still don't get locking.  I just want to increment the number
	in the file.  How can I do this?
        
	Didn't anyone ever tell you web-page hit counters were useless?
        [perldoc perlfaq5]
        


------------------------------

Date: Mon, 06 Jan 2014 15:15:27 +0000
From: Ben Bacarisse <ben.usenet@bsb.me.uk>
Subject: Re: Apache log page counter?
Message-Id: <0.7eb4c61713e2e93c24eb.20140106151527GMT.87bnzpta40.fsf@bsb.me.uk>

Rainer Weikusat <rweikusat@mobileactivedefense.com> writes:

> Ben Morrow <ben@morrow.me.uk> writes:
>> Quoth Tuxedo <tuxedo@mailinator.com>:
>>> I would like to implement a web page counter to measure 'unique' visitors 
>>> p/page and p/IP in 24 hour cycles, so if several visits to a particular 
>>> page comes from a same IP in a 24 hours time frame, it counts as one 
>>> visitor to that page. 
>> [...]
>>> 
>>> The source data is rotating Apache access logs in the format:
>>> 192.114.71.13 - - [05/Jan/2014:19:10:19 +0100] "GET / HTTP/1.1" 302 186 
>>> "http:.../ref_if_transmitted.html" "Mozilla, browser version etc...."
>>
>> Doesn't sound too hard: parse the log lines, extract the IP, page and
>> timestamp, and throw away any pair that is less than 24h newer than an
>> equivalent pair. What have you tried so far?
>
> I'd like to second Dr Ruud on that -- just using the IPs is not a
> suitable way to count visitors because loads and loads of networks used
> by many users sharing one external IP exist, eg, all 'public access'
> WiFi networks, all reasonably small corporate networks and all
> households with more than one member using a device capable of 'acessing
> the internet'.

My historical experience of this technique has not been quite so
negative, though I don't use it anymore, partly because the "client"
stopped asking for it and partly because it's getting less and less
reliable.

If you have a site with only a few thousand visits a day, the number
that will come from shared IP addresses is not going to be vary large.
It's going to be larger than "random" since people on public WiFi or in
small businesses may well be browsing together or all working on
something that causes them to visit the same site.

Some while ago I did test using those clients that seem to provide a
referrer with each request.  The idea was to see how many chains of
pages visits were inconsistent with referrer information when that was
present.  I don't still have the data (and it was long enough ago to be
useless now due to the growth in mobile) but it showed very little
interleaving of "shared IP" visits.  Of course, this can't be directly
extrapolated to clients that don't provide referrer info because they
may well be more common in shared IP environments.

The a reason this matters (or used to at least) is that many people
demand stats no matter how often you tell them they are just semi-random
data.  The site in question was a partially public-funded charity, and
the public funding body demanded all sorts of data.  Sometimes you can
just provide unidentified data -- on one site I used to simply report
the relative size of the log files and everyone was happy with that --
but other times someone else has reported "visitors" and you are pretty
much obliged to do something along those lines.

> Also, I know from experience that some phone companies
> put their customers into RFC1918-networks when using 3G (or 4G).

Just before I stopped doing this sort of logging, I started to see quite
a few visits from mobile devices where multiple IP addresses were
involved in what was very clearly a single "visit".  This is something
that I'd not seen before.  Is this a common feature of mobile IP
networks?  The more common manifestation of RFC1918-networks is one IP
address being used for multiple visits.  Either way, large scale use of
mobile networks is going to make the technique nearly useless.  I don't
think I'd even try these days.

<snip>
-- 
Ben.


------------------------------

Date: Mon, 6 Jan 2014 16:52:40 +0100
From: "Peter J. Holzer" <hjp-usenet3@hjp.at>
Subject: Re: Apache log page counter?
Message-Id: <slrnlclka8.1pp.hjp-usenet3@hrunkner.hjp.at>

On 2014-01-06 15:15, Ben Bacarisse <ben.usenet@bsb.me.uk> wrote:
> Rainer Weikusat <rweikusat@mobileactivedefense.com> writes:
>> Also, I know from experience that some phone companies
>> put their customers into RFC1918-networks when using 3G (or 4G).
>
> Just before I stopped doing this sort of logging, I started to see quite
> a few visits from mobile devices where multiple IP addresses were
> involved in what was very clearly a single "visit".  This is something
> that I'd not seen before.  Is this a common feature of mobile IP
> networks?  The more common manifestation of RFC1918-networks is one IP
> address being used for multiple visits.

If you have a lot of customers behind NAT, you will have more
than 64 k connections (maybe even more than 64 k connections to the same
server!), so you need to use more than 1 public IP address. Depending on
how connections are mapped to public IP addresses, different connections
from the same client may wind up with different public IP addresses.

> Either way, large scale use of mobile networks is going to make the
> technique nearly useless.  I don't think I'd even try these days.

It may become useful again with IPv6, Even with Privacy Extensions.

	hp


-- 
   _  | Peter J. Holzer    | Fluch der elektronischen Textverarbeitung:
|_|_) |                    | Man feilt solange an seinen Text um, bis
| |   | hjp@hjp.at         | die Satzbestandteile des Satzes nicht mehr
__/   | http://www.hjp.at/ | zusammenpat. -- Ralph Babel


------------------------------

Date: Mon, 06 Jan 2014 11:37:52 -0500
From: Charlton Wilbur <cwilbur@chromatico.net>
Subject: Re: Apache log page counter?
Message-Id: <87iotxukv3.fsf@new.chromatico.net>

>>>>> "BB" == Ben Bacarisse <ben.usenet@bsb.me.uk> writes:

    BB> The a reason this matters (or used to at least) is that many
    BB> people demand stats no matter how often you tell them they are
    BB> just semi-random data.  The site in question was a partially
    BB> public-funded charity, and the public funding body demanded all
    BB> sorts of data.  Sometimes you can just provide unidentified data
    BB> -- on one site I used to simply report the relative size of the
    BB> log files and everyone was happy with that -- but other times
    BB> someone else has reported "visitors" and you are pretty much
    BB> obliged to do something along those lines.

Some years back I worked for a startup that had this kind of problem.
I realized a few things:

A good director of marketing understands both the needs of the
particular business for data and the limitations of the data gathering
methods, and figures out ways to connect them.  Good marketing is
data-driven and instinct-driven in roughly equal measures because of the
limitations of data gathering.

From an engineer's point of view, web analytics data is "semi-random."
From the viewpoint of people who have done advertising on TV or in
print, web analytics data is insanely precise and detailed.

After the director of marketing has departed (which is a tale in and of
itself) the executives have no idea what data they want or need, but
they will ask for it in the vaguest of terms while demanding that it be
simultaneously objective and as favorable to what they want to do as
possible.

Without a good director of marketing and a competent CTO, a startup is
doomed to failure.

Charlton





-- 
Charlton Wilbur
cwilbur@chromatico.net


------------------------------

Date: Mon, 6 Jan 2014 19:09:17 +0100
From: Tuxedo <tuxedo@mailinator.com>
Subject: Re: Apache log page counter?
Message-Id: <laergd$fq3$1@news.albasani.net>

Dr.Ruud wrote:

[...]

> Many hundreds of visitors can share the same IP-nr.
> Other visitors can have a fresh IP-nr for every request.
> 
> So you need to store some ID in the client-side cookie.
> And store further details server-side (consider Apache Cassandra).
> 
> That client-side cookie-ID needs protection against tampering and
> duplication. Combine it with a browser fingerprint, and create a fresh
> ID if the fingerprint no longer matches good enough.
> 
> If you implement this all properly, you can use the factoids
> dynamically, meaning that you can make them directly influence the
> content of the served pages.
> 

Many thanks for pointing out the above facts. I guess the only way to have 
semi-reliable unique visitors data is through the use of cookies combined 
with browser fingerprinting, which was something I was hoping to avoid.

Tuxedo




------------------------------

Date: Sun, 05 Jan 2014 23:42:04 +0200
From: George Mpouras <gravitalsun@hotmail.foo>
Subject: Re: Help with understanding references to subroutines
Message-Id: <lacjjc$2aba$1@news.ntua.gr>

Στις 4/1/2014 21:40, ο/η Dave Stratford έγραψε:
> use Data::Dump 'pp'


you could just say

	sub call_sub
	{
	$_[0]->()
	}


I use very often subroutine references usually stored as hash values to 
eliminate my if/elsif/else statements and make my scripts a lot smaller


------------------------------

Date: Tue, 07 Jan 2014 13:45:30 +0000
From: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Subject: Re: Help with understanding references to subroutines
Message-Id: <87sisz29dx.fsf@sable.mobileactivedefense.com>

Ben Morrow <ben@morrow.me.uk> writes:

[...]

> As Rainer pointed out, the &-form for calling subs can have
> side-effects; in the particular case of calling through a reference,
> prototypes don't apply, but if you write the call as
>
>     $retval = &$data;
>
> rather than
>
>     $retval = &$data();
>
> $data will inherit the current @_, which is obviously a Bad Thing.

I beg to differ here: Accidentally writing code whith this property is
very likely a 'Bad Thing', however, the feature itself is quite useful
for building subroutine processing pipelines where each individual sub
performs 'some subtask of something' which possibly involves modifying
@_ and then 'passes the buck' to another subroutine withg &-call.


------------------------------

Date: Wed, 08 Jan 2014 11:01:07 +0000 (GMT)
From: Dave Stratford <daves@orpheusmail.co.uk>
Subject: Re: Help with understanding references to subroutines
Message-Id: <53c6c02549daves@orpheusmail.co.uk>

In article <fsahc9lau7s5n6a1mmc32drlmru6hs9ji1@4ax.com>,
   Jrgen Exner <jurgenex@hotmail.com> wrote:
> Dave Stratford <daves@orpheusmail.co.uk> wrote:
> [...]
> >When I run it, I get exactly what I want to get, but it seems to me to
> >be an excessively awkward way to decide which of two subroutines you
> >want to call.

> In that contrived example, yes.

<snip>

Thanks for all the help and advice guys. I'm still not 100% sure I
understand it enough, but at least I do know that there is a reason.

Dave




------------------------------

Date: Mon, 6 Jan 2014 11:14:50 -0800 (PST)
From: klimovitsky@gmail.com
Subject: Re: Perl Script for Reading STDF files (Teradyne Standard TEst Data Format)
Message-Id: <a84de528-9f50-44d7-be7d-275242cb2111@googlegroups.com>

On Monday, September 23, 2002 8:40:55 PM UTC-4, Chris Paskins wrote:
> As I am quite fluent in Perl, I am looking for the for the binary
> format of STDF files. I have tried looking on the Teradyne website,
> but met with no success. Maybe someone out there either already has a
> script to read STDF files or they have the format. Thanks for your
> help

Any luck?


------------------------------

Date: Mon, 06 Jan 2014 12:46:22 -0800
From: Jrgen Exner <jurgenex@hotmail.com>
Subject: Re: Perl Script for Reading STDF files (Teradyne Standard TEst Data Format)
Message-Id: <im0mc951gpf2di0t9uvfvqb9ihfl727mm1@4ax.com>

klimovitsky@gmail.com wrote:
>On Monday, September 23, 2002 8:40:55 PM UTC-4, Chris Paskins wrote:
>> As I am quite fluent in Perl, I am looking for the for the binary
>> format of STDF files. I have tried looking on the Teradyne website,
>> but met with no success. Maybe someone out there either already has a
>> script to read STDF files or they have the format. Thanks for your
>> help
>
>Any luck?

If he hasn't solved his problem 11 1/2 years ago I am seriously hoping
he didn't hold his breath until now

jue


------------------------------

Date: Tue, 07 Jan 2014 15:46:40 -0500
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Perl Script for Reading STDF files (Teradyne Standard TEst Data Format)
Message-Id: <874n5f8qq7.fsf@stemsystems.com>

>>>>> "JE" == Jürgen Exner <jurgenex@hotmail.com> writes:

  JE> klimovitsky@gmail.com wrote:
  >> On Monday, September 23, 2002 8:40:55 PM UTC-4, Chris Paskins wrote:
  >>> As I am quite fluent in Perl, I am looking for the for the binary
  >>> format of STDF files. I have tried looking on the Teradyne website,
  >>> but met with no success. Maybe someone out there either already has a
  >>> script to read STDF files or they have the format. Thanks for your
  >>> help
  >> 
  >> Any luck?

  JE> If he hasn't solved his problem 11 1/2 years ago I am seriously hoping
  JE> he didn't hold his breath until now

and a quick google for 'perl teradyne stdf' shows many hits with scripts
and other libs.

uri


------------------------------

Date: Tue, 07 Jan 2014 13:56:34 +0200
From: George Mpouras <gravitalsun@hotmail.foo>
Subject: Re: Perl Script for Reading STDF files (Teradyne Standard TEst Data Format)
Message-Id: <lagq1m$ous$1@news.ntua.gr>

Στις 6/1/2014 22:46, ο/η Jürgen Exner έγραψε:
> klimovitsky@gmail.com wrote:
>> On Monday, September 23, 2002 8:40:55 PM UTC-4, Chris Paskins wrote:
>>> As I am quite fluent in Perl, I am looking for the for the binary
>>> format of STDF files. I have tried looking on the Teradyne website,
>>> but met with no success. Maybe someone out there either already has a
>>> script to read STDF files or they have the format. Thanks for your
>>> help
>>
>> Any luck?
>
> If he hasn't solved his problem 11 1/2 years ago I am seriously hoping
> he didn't hold his breath until now
>
> jue
>


that is why I keep all my important documents as utf8 plaint text on an 
encrypted volume. I strongly believe that is a huge mistake to keep 
important info propriety formats (that only should generated on demand 
from the text files)




------------------------------

Date: Sun, 5 Jan 2014 20:17:36 +0100
From: "Peter J. Holzer" <hjp-usenet3@hjp.at>
Subject: Re: Question about language setting
Message-Id: <slrnlcjbug.hgu.hjp-usenet3@hrunkner.hjp.at>

On 2014-01-05 16:25, Ben Morrow <ben@morrow.me.uk> wrote:
> Quoth "Peter J. Holzer" <hjp-usenet3@hjp.at>:
>> On 2014-01-05 03:07, Keith Thompson <kst-u@mib.org> wrote:
>> > Rainer Weikusat <rweikusat@mobileactivedefense.com> writes:
>> >> Neither had I[*]. But
>> >>
>> >> setlocale(LC_NUMERIC, "de_DE");
>> >>
>> >> is supposed to switch to 'Germanly formatted numerals'
>> >
>> > According to what standard?  ISO C only defines the "C" locale; others
>> > are implementation-defined.  POSIX adds "POSIX" as a synonym for "C".
>> 
>> The Open Group Base Specification Issue 7; IEEE Std 1003.1, 2013 Edition:
>> 
>> | [XSI] [Option Start]
>> | If the locale value has the form:
>> | 
>> | language[_territory][.codeset]
>> | 
>> | it refers to an implementation-provided locale, where settings of
>> | language, territory, and codeset are implementation-defined.
>
> This says neither that de_DE must be supported 

No, but it does say that if it exists, it must be a locale suitable for
the language "de" and the territory "DE". It doesn't say that "de" means
German and "DE" means Germany, but I already wrote that.

> nor that it must refer to a locale using , as the decimal separator if
> it is.

Well, "de" could mean "Dublin English", and then it probably refer to a
locale where the decimal separator is ".". But that is clearly being
facetious: While some systems may have alternate names for the languages
and territories (HP-UX 9.x used full names instead of abbreviations, and
Debian still has "deutsch" and "german" als aliases for de_DE.iso88591),
it is not reasonable to assume that the language code "de" refers to any
other language than German and that the territory code "DE" refers to
any other country than Germany. And it is not reasonable to assume that
a German locale for Germany in 2014[1] could prescribe any other decimal
separator than ",".

So I agree with Rainer here. On a modern POSIX system,
setlocale(LC_NUMERIC, "de_DE") must either set the decimal separator to
"," or fail. 

	hp

[1] Historically the decimal separator hasn't been that uniform: The
    "WIFO-Monatsberichte" of the Austrian Institute of Economic Research
    have used at least 3 different separators between 1927 and now. My
    mother still uses a dot instead of a comma (I do, too, but for a
    different reason).

-- 
   _  | Peter J. Holzer    | Fluch der elektronischen Textverarbeitung:
|_|_) |                    | Man feilt solange an seinen Text um, bis
| |   | hjp@hjp.at         | die Satzbestandteile des Satzes nicht mehr
__/   | http://www.hjp.at/ | zusammenpat. -- Ralph Babel


------------------------------

Date: Sun, 5 Jan 2014 22:30:59 +0000
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Question about language setting
Message-Id: <323ppa-2gc1.ln1@anubis.morrow.me.uk>


Quoth "Peter J. Holzer" <hjp-usenet3@hjp.at>:
> 
> So I agree with Rainer here. On a modern POSIX system,
> setlocale(LC_NUMERIC, "de_DE") must either set the decimal separator to
> "," or fail. 

Rainer was not admitting to the possibility of the 'or fail' part.

Ben



------------------------------

Date: Mon, 06 Jan 2014 01:08:39 +0000
From: Rainer Weikusat <rweikusat@mobileactivedefense.com>
Subject: Re: Question about language setting
Message-Id: <87zjn9or1k.fsf@sable.mobileactivedefense.com>

Ben Morrow <ben@morrow.me.uk> writes:
> Quoth "Peter J. Holzer" <hjp-usenet3@hjp.at>:
>> 
>> So I agree with Rainer here. On a modern POSIX system,
>> setlocale(LC_NUMERIC, "de_DE") must either set the decimal separator to
>> "," or fail. 
>
> Rainer was not admitting to the possibility of the 'or fail' part.

Actually, perl is not admitting the possibility of the 'or fail' part
because the code in question doesn't check the return value of
setlocale. But that's somewhat of a useless discussion because de_DE is
the locale-code for German for all real systems which happened to figure in
this thread (Debian, Illumos and OS/2) and hence, if
'setlocale(LC_NUMERIC, "de_DE")' does not switch to a German locale with , instead
of a decimal point, "it didn't do what it was supposed to do". There may
be various reason for that, 'German locale information unavailable'
being among them, but since debugging a problem which occurs on a system
with this information when it is being used is not really possible
without it, I took the liberty of assuming that it would be available.





------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests. 

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V11 Issue 4110
***************************************


home help back first fref pref prev next nref lref last post