Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

(jeffa) Re: 1 vs "1"

by jeffa (Bishop)
on Sep 12, 2001 at 19:02 UTC ( [id://111922]=note: print w/replies, xml ) Need Help??


in reply to 1 vs "1"

UPDATE: Oct, 11 2001
Ok, now i know why davorg was getting on to me about my original post - first off, i misunderstood the question, secondly, my regex was quite pitiful.

davorg was on to me because ...

  1. he knew that i own his book
  2. his book has a better regex

Replies are listed 'Best First'.
Re: (jeffa) Re: 1 vs "1"
by davorg (Chancellor) on Sep 12, 2001 at 19:11 UTC

    Unless I misunderstood the original question, this doesn't answer it. I read it to mean that if you had two scalars like this:

    my $number = 1; my $string = "1";

    how would you tell which is a string and which is a number. I don't think your solution addresses this.

    Oh, and your regex to check for floating point numbers could use some work too :)

    --
    <http://www.dave.org.uk>

    Perl Training in the UK <http://www.iterative-software.com>

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://111922]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-25 13:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found