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: [ichi] How do I do this...: Edit Log



vikas.deep
User

Jul 2, 2009, 11:29 PM


Views: 4643
Re: [ichi] How do I do this...


Code
that's one of the things i hate about Perl. Why have 2 syntax to check for equality. anyway,



Dear Ichi,

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. In C you have to predeclare int (something) so that the computer knows that this is a number and processes it accordingly. For that matter in C there are a lot of variable types which complicate matters In Perl you don't have to worry about the exact variable type but you have to pay a price later on.


Code
  that said, its just a pseudocode for OP to explore, not a full solution.



Haa! Haa! you find it difficult to accept your fault(even if it was a pseudocode). Same with me. May be because you take it (perl and your posts) very sincerely. Believe me after posting anything here I am also very worried that if I have said the right things and feel relieved only when I read thanks in reply to my posts and I hate to read that my code is not working or I am caught on wrong foot.


Code

-For all my suggestions " I am sure someone else can do it in a better or elegant manner!"

(This post was edited by vikas.deep on Jul 2, 2009, 11:30 PM)


Edit Log:
Post edited by vikas.deep (User) on Jul 2, 2009, 11:30 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