CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner: Re: [vikas.deep] How do I do this...: Edit Log



ichi
User

Jul 4, 2009, 8:01 PM


Views: 4376
Re: [vikas.deep] How do I do this...


In Reply To
YOU can't have best of both the worlds or (if I am right) have a cake and eat it too. You hate to use two different syntaxs for equality but you forgot that perl has simplified variable declaration by letting you to use a scalar($) for whatever be the value. It is precisely for this reason that there are two different syntaxes for equality because how will perl know that that $something is a number or string.

yes i can. i can switch to a language that doesn't have that kind of distinction. eg Python

Code
if input == 3:


Code
if input == "astring":

here, i can use == for both. Now i can have my cake and eat it.
As for the rest of your comments, sorry but i won't bother understanding and replying them since they are OT.


(This post was edited by ichi on Jul 4, 2009, 8:03 PM)


Edit Log:
Post edited by ichi (User) on Jul 4, 2009, 8:03 PM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives