> In a scalar context, it could produce a date object always:
>
>    $date = date;
>
> However, when you went to do anything with it in a string context, it
> would call the appropriate method:
>
>    print "$date";     # calls $date->STRING, which in this case would
>                       # print out a ctime formatted date string


Well, I like this. It reminds me of Java's .toString method (see
http://java.sun.com/products/jdk/1.1/docs/api/java.lang.String.html ). I am
intrigued by the idea of a "scalar" context, and a "string" context though.

--Michael

Reply via email to