Type Casting

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ranjith
    New Member
    • May 2012
    • 2

    Type Casting

    Hi could anyone guide to convert the below expression as integer


    $number="(3+4)* (5+6)";
  • RonB
    Recognized Expert Contributor
    • Jun 2009
    • 589

    #2
    Take off the quotes.

    Comment

    • Ranjith
      New Member
      • May 2012
      • 2

      #3
      Thanks, i aware about that but i would like to know how to change $number="(3+4)* (5+6)"; this format as integer.without taking the quotes..

      Comment

      • RonB
        Recognized Expert Contributor
        • Jun 2009
        • 589

        #4
        You don't need to do anything. Perl is not strongly typed, so there's no casting that needs to be done by you. It's based on the context in which you use the var.

        Can you provide a code snippet where you think you need the type casting and explain the problem that you're seeing?

        Comment

        Working...