Perl
  Home arrow Perl arrow Page 5 - Perl: More on Data Types and Operators
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Moblin 
JMSL Numerical Library 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PERL

Perl: More on Data Types and Operators
By: James Payne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 2
    2007-10-15

    Table of Contents:
  • Perl: More on Data Types and Operators
  • Hashes are Yummy
  • Operating the Deep Seas
  • Incremental/ Decremental
  • Comparing Numbers

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Perl: More on Data Types and Operators - Comparing Numbers


    (Page 5 of 5 )

     

    Symbol

    What it Does

    ==

    Equal to

    !=

    Not Equal to

    >

    Greater than

    <

    Less than

    >=

    Greater than or Equal to

    <=

    Less than or Equal to

    Comparing numbers is similar to comparing strings, except it is more obvious. 1 is greater than 2, 1 is equal to 1, 0 is less than 50, etc. I know, it's complex, fourth grade math and whatnot.


    $value_one = 3;

    $value_two = 2;

    if ($value_one gt $value_two)

    {

    print “3 is greater than 2!”;

    }

    Logical Operators

     

    Symbol

    What it Does

    &&

    AND

    ||

    OR

    !

    NOT

    Lastly, we come to the logical operators. These help set criteria for us to evaluate data with. We may want to write a program that asks if this value is greater than that value AND it is less than that value, do this. These are known as conditionals and we will discuss those in depth in the next tutorial.

    That's it for this tutorial. In our next tutorial we will be dealing with Conditionals and Loops, so be sure to drop by and check it out or else I will be jobless and living on the street. I'll be that guy that asks for a dollar and then complains when all you give me is a dollar. How can I buy a bottle of rum for a dollar you cheapskate?

    Till then...


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · Hey guys, thanks for dropping by and reading my article; I hope its helpful. Perl is...
     

       

    PERL ARTICLES

    - Site Layout with Perl Templating Tools
    - Build a Perl RSS Aggregator with Templating ...
    - Looping, Security, and Templating Tools
    - Perl: Bon Voyage Lists and Hashes
    - Templating Tools
    - Perl: Number Crunching
    - Perl Debuggers in Detail
    - Debugging Perl
    - Perl: More on Lists and Hashes
    - Perl: Dimensional Lists
    - Perl: A Continuing Look at Hashes and Multid...
    - Perl: Another Round with Hashes
    - Perl Hashes
    - Perl Lists: A Final Look at List::Util
    - Perl Lists: Utilizing List::Util





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway