Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

(jeffa) Re: 1 vs "1"

by jeffa (Bishop)
on Sep 12, 2001 at 19:02 UTC ( #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 :)


    Perl Training in the UK <>

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2022-08-18 13:19 GMT
Find Nodes?
    Voting Booth?

    No recent polls found