Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: Why are my hyphens in number strings stored as dots?

by oko1 (Deacon)
on Feb 14, 2012 at 03:07 UTC ( #953592=note: print w/replies, xml ) Need Help??

in reply to Why are my hyphens in number strings stored as dots?

I'll agree with GrandFather, and add one: how about you show us the data, too - maybe by running it through 'hexdump -C' or some equivalent?

#!/usr/bin/perl -w use strict; my $s1 = "1\xe2\x80\x932\xe2\x80\x933"; my $s2 = "1-2-3"; print "$s1: not $s2, but a brilliant imitation!\n" unless $s1 eq $s2;


1𣇽: not 1-2-3, but a brilliant imitation!

Depending on your character set, those n-dashes could well end up looking like dots, etc.

I hate storms, but calms undermine my spirits.
 -- Bernard Moitessier, "The Long Way"

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://953592]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2017-07-25 07:00 GMT
Find Nodes?
    Voting Booth?
    I came, I saw, I ...

    Results (364 votes). Check out past polls.