[LA.pm] Spam:***, Re: little help??
Peter Benjamin
pete at peterbenjamin.com
Thu Sep 29 18:44:07 PDT 2005
At 04:03 PM 9/29/2005, Peter Scott wrote:
>use Time::localtime;
>my $hour = localtime->hour;
I do like this approach to grabbing frequently used values
when you need "just one" this works out to less typing, or
copy and pasting.
I like to gather my "use" statements at the top of the
perl file. So it means pasting in two places, and more
prone to error when re-using code, but it's the modern
architect to use objects, even if slow.
As I learned to program for efficiency, so long ago,
use of objects to set one value...
Now is the time to talk about including hundreds of
lines of perl code to compile and just use a few of them.
>At 03:26 PM 9/29/2005, terry mcintyre wrote:
>>I often use a similar method, but to avoid the warning
>>messages about unused variables, the following twist:
>>
>># ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)
>>my (undef,undef,$hour) = localtime(time);
These warnings bother you a lot? Why?
I do wish I could suspress just that one.
More information about the Losangeles-pm
mailing list