Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Re: Entering data into MySql using CGI

by ghost (Beadle)
on Oct 09, 2001 at 01:37 UTC ( [id://117567]=note: print w/replies, xml ) Need Help??


in reply to Re: Entering data into MySql using CGI
in thread Entering data into MySql using CGI

Since the state abbreviations are only two characters long, you can write a regex that should handle it with no problems.
$states = "NY\nNJWA\nALCOOR"; print "-$1-\n" while($states =~ /(\w\w)/g);
It seems an odd way to do it, though. Why would the user want to type in each state that way? Seems much, much easier to go with someone else's suggestion here and use a SELECT box instead.

(And headlights would work at the speed of light, since they're traveling relative to your speed.)

Replies are listed 'Best First'.
Re: Entering data into MySql using CGI
by cLive ;-) (Prior) on Oct 09, 2001 at 04:59 UTC
    "And headlights would work at the speed of light.."

    Hmm, methinks you need to read up on physics a little bit.

    Or think about this. If you could* travel at the speed of light and you turned them on, are you saying the light would shine forwards and then reflect back to you? If so, then light is travelling faster than the speed of light. Oh but hang on, it can't, coz it travels at the speed of light. Therefore, you travel through where you want them to shine at the same speed that the light shines at, so the lights won't illuminate things in front of you, therefore they don't "work".

    cLive ;-)

    *...let's forget about the time travel and infinite mass problems etc here for simplicity's sake!

      I think you need to consider it a little more or, at the least, look into a textbook to confirm your suppositions. But I'm not going to go into it on this forum unless you write a Perl script that demonstrates your point.

      I was just making a slight (very slight) joke.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-20 03:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found