[Israel.pm] time of pc

rami doqa rod082 at yahoo.com
Thu Jun 22 00:20:12 PDT 2006


hello, to do that u need to write the following code:
 
my @time = localtime(time());
           
my $second = $time[0];
my $minute = $time[1];
my $hour = $time[2];

my $day = $time[3];
my $month = $time[4]+1;
my $year = $time[5]+1900;

after that u can join the formate u want to view
 
or use date::calc on CPAN

--- "Ernst, Yehuda" <yernst at nds.com> wrote:

> Hello!
> 
> How do i show the time (clock) of my pc in perl?
> 
> i tried localtime but i could not parse it.
> 
> Thanks
> 
> Yehuda Ernst                        יהודה
> ארנסט
> NDS Technologies Israel Ltd. mailto:yernst at nds.com>
> Jerusalem          Tel:  +972 (2) 589-4427
> PO Box 23012    Fax: +972 (2) 589-4825
> Israel.    91235    Cell  +972 54 5664427
> 
>
***********************************************************************************
> This email message and any attachments thereto are
> intended only for use by the addressee(s) named
> above, and may contain legally privileged and/or
> confidential information. If the reader of this
> message is not the intended recipient, or the
> employee or agent responsible to deliver it to the
> intended recipient, you are hereby notified that any
> dissemination, distribution or copying of this
> communication is strictly prohibited. If you have
> received this communication in error, please
> immediately notify the postmaster at nds.com and
> destroy the original message.
>
***********************************************************************************
> 
> _______________________________________________
> Perl mailing list
> Perl at perl.org.il
> http://perl.org.il/mailman/listinfo/perl
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the Perl mailing list