[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Novice question regards subroutines



$x = "one plus one";          #watch out for this one!

print "yes" if $x = "two";    #Why does this work? The assignment
succeeded,

print $x;                            #so it's true.



This works because of the /"$x = "two"/ part.

This is always true, because it assigns the value succesfully.

Change the second line to /"$x = "five"/ and it still works.

Note that /"$x eq "two"/ does not work ;(


Jon



<fontfamily><param>Courier</param>                                    \\\|///

                                    | ~ ~ |

                                   (- o o -)

 ===============================oOOOo=(_)=oOOOo=====

| Jon Lucenius - MultiMedia Director               |

| JCL Technologies                                 |

| E-mail: mailto:jonl@magpage.com                  |

| Office: 302-369-3016                             |

| Home  : 302-369-2989                             |

| Snail :17 Deer Run Drive                         |

|       :Newark DE 19702                   Oooo    |

 ==================================oooO====(  )=====

  "Quality Dynamic Technology."    (  )    ) /

      - Custom Progamming           \ (   (_/

       - Graphic Design              \_)

        - Interface Development</fontfamily>

</x-rich>