Re: Date and Time and Function calls

2007-11-25 Thread Martin Barth
Hi Andrew, I would suggest http://search.cpan.org/~tjenness/File-Temp-0.19/Temp.pm HTH Martin On Sat, 24 Nov 2007 08:44:18 -0800 AndrewMcHorney <[EMAIL PROTECTED]> wrote: > Hello > > I am looking for a perl function or functions that will give me the > date and time. I a

Re: Date and Time and Function calls

2007-11-25 Thread Dr.Ruud
rahed schreef: > AndrewMcHorney: >> I am looking for a perl function or functions that will give me the >> date and time. I am going to use the results to create a unique file >> name. > > There are many posibilities depending on uniqueness, > this is quite simila

Re: Date and Time and Function calls

2007-11-25 Thread rahed
AndrewMcHorney <[EMAIL PROTECTED]> writes: > Hello > > I am looking for a perl function or functions that will give me the > date and time. I am going to use the results to create a unique file > name. There are many posibilities depending on uniqueness, this is quite simil

Re: Date and Time and Function calls

2007-11-25 Thread Tom Phoenix
On 11/24/07, AndrewMcHorney <[EMAIL PROTECTED]> wrote: > I am looking for a perl function or functions that will give me the > date and time. Are you looking in the perlfunc manpage? Type 'perldoc perlfunc' at a prompt (or into your favorite search engine) to get started

Re: Date and Time and Function calls

2007-11-25 Thread yitzle
> > I am looking for a perl function or functions that will give me the > date and time. I am going to use the results to create a unique file name. > > Andrew -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Date and Time and Function calls

2007-11-25 Thread AndrewMcHorney
Hello I am looking for a perl function or functions that will give me the date and time. I am going to use the results to create a unique file name. Andrew -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Date and time

2007-01-22 Thread M. Lewis
Rob Dixon wrote: M. Lewis wrote: > > Given the following code, if I were to want $day, $month, $hour, $minute > & $sec to have a leading zero (ie 01 for Jan rather than 1), is my only > option to use printf? Or is there a better way. > > What I'm searching for here is the *correct* method

Re: Date and time

2007-01-21 Thread Rob Dixon
M. Lewis wrote: > > Given the following code, if I were to want $day, $month, $hour, $minute > & $sec to have a leading zero (ie 01 for Jan rather than 1), is my only > option to use printf? Or is there a better way. > > What I'm searching for here is the *correct* method to get $day, $month, > et

Re: Date and time

2007-01-21 Thread Dr.Ruud
"M. Lewis" schreef: > if I were to want $day, $month, $hour, > $minute & $sec to have a leading zero (ie 01 for Jan rather than 1), > is my only option to use printf? Or is there a better way. > > What I'm searching for here is the *correct* method to get $day, > $month, etc for uses like naming

Re: Date and time

2007-01-21 Thread Goksie
M. Lewis wrote: > > Given the following code, if I were to want $day, $month, $hour, > $minute & $sec to have a leading zero (ie 01 for Jan rather than 1), > is my only option to use printf? Or is there a better way. > > What I'm searching for here is the *correct* method to get $day, > $month, etc

Re: Date and time

2007-01-21 Thread Owen
On Sun, 21 Jan 2007 02:17:08 -0500 "M. Lewis" <[EMAIL PROTECTED]> wrote: > > Given the following code, if I were to want $day, $month, $hour, $minute > & $sec to have a leading zero (ie 01 for Jan rather than 1), is my only > option to use printf? Or is there a better way. Look at sprintf pe

Re: Date and time

2007-01-21 Thread John W. Krahn
M. Lewis wrote: > > Given the following code, if I were to want $day, $month, $hour, $minute > & $sec to have a leading zero (ie 01 for Jan rather than 1), is my only > option to use printf? Or is there a better way. > > What I'm searching for here is the *correct* method to get $day, $month, > e

Date and time

2007-01-20 Thread M. Lewis
Given the following code, if I were to want $day, $month, $hour, $minute & $sec to have a leading zero (ie 01 for Jan rather than 1), is my only option to use printf? Or is there a better way. What I'm searching for here is the *correct* method to get $day, $month, etc for uses like naming b

RE: Date and Time Functions

2006-09-22 Thread Lee Goddard
Xavier Mas i Ramón [mailto:[EMAIL PROTECTED] : > A Dijous 21 Setembre 2006 01:38, [EMAIL PROTECTED] va escriure: > > > I am looking for some simple perl functions that will return the > > current date and time in string format. The purpose is to create a > > file with pa

Re: Date and Time Functions

2006-09-21 Thread Xavier Mas i Ramón
A Dijous 21 Setembre 2006 01:38, [EMAIL PROTECTED] va escriure: > Hello > > I am looking for some simple perl functions that will return the current > date and time in string format. The purpose is to create a file with part > of the name being the date and time. > > Thanks,

Re: Date and Time Functions

2006-09-20 Thread Owen Cook
On Wed, 20 Sep 2006 [EMAIL PROTECTED] wrote: > Hello > > I am looking for some simple perl functions that will return the current date > and time in string format. The purpose is to create a file with part of the > name being the date and time. I use some

Re: Date and Time Functions

2006-09-20 Thread Jeff Pang
7;s output. Hope it helps. -Original Message- >From: [EMAIL PROTECTED] >Sent: Sep 21, 2006 7:38 AM >To: beginners@perl.org >Subject: Date and Time Functions > >Hello > >I am looking for some simple perl functions that will return the current date >and time in

Date and Time Functions

2006-09-20 Thread andrewmchorney
Hello I am looking for some simple perl functions that will return the current date and time in string format. The purpose is to create a file with part of the name being the date and time. Thanks, Andrew -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Date and Time Functions

2006-09-20 Thread andrewmchorney
Hello I am looking for some simple perl functions that will return the current date and time in string format. The purpose is to create a file with part of the name being the date and time. Thanks, Andrew -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: date and time in perl

2006-04-10 Thread nishanth ev
Hello, Use this code according to your requirement. #!/usr/bin/perl $no=`date`; print $no; Regards Nish __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- To unsubscribe, e-mail: [EMAI

Re: date and time in perl

2006-04-10 Thread Dr.Ruud
Irfan J Sayed schreef: > Can you tell me exact command / syntax [...] > so that i can store date,time in some variable. See: perldoc -f localtime http://perlmeme.org/faqs/datetime/ -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional co

Re: date and time in perl

2006-04-10 Thread Irfan J Sayed
Thanks Jelf Regards Irfan Sayed Jeff Pang <[EMAIL PROTECTED]> 04/10/2006 06:11 PM Please respond to Jeff Pang <[EMAIL PROTECTED]> To beginners@perl.org cc Subject Re: date and time in perl >Hi, > >Can you tell me exact command / syntax as i struggled lot bu

Re: date and time in perl

2006-04-10 Thread Jeff Pang
>Hi, > >Can you tell me exact command / syntax as i struggled lot but didn't >succeed so that i can store date,time in some variable. > Hi,you can use the 'strftime' which is coming from POSIX to get your time format similar to Unix shell command. for example,you could write: use POSIX qw(str

Re: date and time in perl

2006-04-10 Thread Irfan J Sayed
cc beginners@perl.org Subject Re: date and time in perl On 4/1/06, Irfan J Sayed <[EMAIL PROTECTED]> wrote: > Hi All, > > How to get date and time in perl ? is there any function for that ? > > Regards > Irfan Sayed localtime() returns the current time in your timezone

Re: date and time in perl

2006-04-10 Thread Chas Owens
On 4/1/06, Irfan J Sayed <[EMAIL PROTECTED]> wrote: > Hi All, > > How to get date and time in perl ? is there any function for that ? > > Regards > Irfan Sayed localtime() returns the current time in your timezone. When called in scalar context it returns a string repres

date and time in perl

2006-04-10 Thread Irfan J Sayed
Hi All, How to get date and time in perl ? is there any function for that ? Regards Irfan Sayed

Re: Date and time calculation

2004-06-17 Thread Chris Charley
> Hi there, > > I've got a date field and a time field, how can I effectively subtract the > field ($date $time) - ($date2 $time2) from each other. I am using these > two fields to determine a server's uptime according to my database in > days,hours,minutes,seconds. > Kind Regards, > Werner Otto P

RE: Date and time calculation

2004-06-16 Thread Tim Johnson
: Subject: Re: Date and time calculation Date::Calc Date::Manip DateTime All make this trivial.

Re: Date and time calculation

2004-06-16 Thread Wiggins d Anconia
> According to perldoc. > > Date_to_Time: > $time = Date_to_Time($year,$month,$day, $hour,$min,$sec); > > Here I can go print $time and get the value > > Time_to_Date: > ($year,$month,$day, $hour,$min,$sec) = Time_to_Date([time]); > > How do I see the value converted back to the dat

Re: Date and time calculation

2004-06-16 Thread Werner Otto
According to perldoc. Date_to_Time: $time = Date_to_Time($year,$month,$day, $hour,$min,$sec); Here I can go print $time and get the value Time_to_Date: ($year,$month,$day, $hour,$min,$sec) = Time_to_Date([time]); How do I see the value converted back to the date as it was? Hi there, I've got

Re: Date and time calculation

2004-06-16 Thread Wiggins d Anconia
> Hi there, > > I've got a date field and a time field, how can I effectively subtract the > field ($date $time) - ($date2 $time2) from each other. I am using these > two fields to determine a server's uptime according to my database in > days,hours,minutes,seconds. I have read numourous articl

Date and time calculation

2004-06-16 Thread Werner Otto
Hi there, I've got a date field and a time field, how can I effectively subtract the field ($date $time) - ($date2 $time2) from each other. I am using these two fields to determine a server's uptime according to my database in days,hours,minutes,seconds. I have read numourous articles and posts

Re: Date and Time

2004-01-23 Thread Owen
On Thu, 22 Jan 2004 17:06:58 -0800 "Larry Guest" <[EMAIL PROTECTED]> wrote: > > But rsync does not know how to handle this string, I think when its > passed to rsync its not text as I see it on the screen. It cant make > the dir and pukes. > > I have seen a bunch of stuff out there for sprintf

RE: Date and Time

2004-01-22 Thread Tim Johnson
List' Subject: Date and Time I can get the format I want like this. my $date = `date +%m-%d-%Y_%H-%M-%S`; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Date and Time

2004-01-22 Thread Larry Guest
I am calling rsync from my perl script. When it runs it creates a dir where I want the backups to go. I need this dir to be the current date-time. I can get the format I want like this. my $date = `date +%m-%d-%Y_%H-%M-%S`; Which gives me 01-22-2004_20-04-14 But rsync does not

Re: Date and time modified

2002-09-09 Thread Paul Johnson
On Fri, Aug 09, 2002 at 06:13:41PM +0200, Quincy Ntuli wrote: > Greetings. > > I wish to obtain the time and date of a file. > > How do i do this in perl ? perldoc -f stat perldoc -f -X > There is probably a module out there to do this but is it possible to > modify the

Re: Date and time modified

2002-09-09 Thread drieux
On Friday, Aug 9, 2002, at 09:13 US/Pacific, Quincy Ntuli wrote: > Greetings. > > I wish to obtain the time and date of a file. > > How do i do this in perl ? perldoc -f stat ciao drieux --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Date and time modified

2002-09-09 Thread Quincy Ntuli
Greetings. I wish to obtain the time and date of a file. How do i do this in perl ? There is probably a module out there to do this but is it possible to modify the date and time format of the output of whatever method is available for getting the time and date modified for a file ? thanx

Re: teaching examples (was "Re: Date and Time")

2002-07-15 Thread Peter Scott
At 09:13 AM 7/15/02 -0500, David T-G wrote: >I *think* I understand this. > > - 'my' defines a var for only this block and does not export to > subroutines Correct, although 'export' is the wrong term. This is why these are called 'lexical' variables; their scope is lexically defined (as

Re: teaching examples (was "Re: Date and Time")

2002-07-15 Thread David T-G
drieux, et al -- ...and then drieux said... % % On Saturday, July 13, 2002, at 07:11 , David T-G wrote: % % In the main I like where this is generally going. Yay :-) % % A part of my argument with myself today has been about % % which is better? all 'teaching code' should be 'virgin

Re: teaching examples (was "Re: Date and Time")

2002-07-13 Thread drieux
On Saturday, July 13, 2002, at 07:11 , David T-G wrote: In the main I like where this is generally going. A part of my argument with myself today has been about which is better? all 'teaching code' should be 'virgin clean'??? or should we show the actual process by which ideas

Re: teaching examples (was "Re: Date and Time")

2002-07-13 Thread David T-G
Peter, et al -- ...and then Peter Scott said... % % At 11:18 AM 7/12/02 -0500, David T-G wrote: % > % >...and then Peter Scott said... % >% ... % >% possible. Later on I show the beginners a nasty example of the % >% consequences of leaving out use strict, -w/use warnings, or both. % > % >Oooh!

Re: Date and Time

2002-07-12 Thread Peter Scott
At 11:18 AM 7/12/02 -0500, David T-G wrote: >Peter, et al -- > >...and then Peter Scott said... >% >... >% code. (Yes, IMHO, if you insist.) My students see it in every program >% I show them, from Hello World onward. I tell them that if anyone gives >% them code without it to maintain, they sh

Re: Date and Time

2002-07-12 Thread David T-G
Peter, et al -- ...and then Peter Scott said... % ... % code. (Yes, IMHO, if you insist.) My students see it in every program % I show them, from Hello World onward. I tell them that if anyone gives % them code without it to maintain, they should refuse if at all % possible. Later on I sh

Fw: Re: Date and Time

2002-07-11 Thread jffusion
first off let me say thank you for the help I know I am a pest, but I am learning a lot Anyway I fixed everything so it works fine in my editor However now it refuses to work in my browser. I keep getting an error 500 Which I can only assume is because of my html header. I checked the subject in

Re: Date and Time

2002-07-11 Thread zentara
On Wed, 10 Jul 2002 11:52:55 -0400, [EMAIL PROTECTED] wrote: >This is what I have now. >... >The only problem seems to be the >use strict; directive >if I take this out it works fine > >So I guess I need to know if the use strict; directive is really >necessary and if so how do I get around

RE: Date and Time

2002-07-10 Thread Timothy Johnson
wday,$yday,$isdst) = localtime(time); -Original Message- From: Kipp, James [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 10, 2002 9:46 AM To: [EMAIL PROTECTED] Subject: RE: Date and Time > > The only problem seems to be the > use strict; directive > if I take this out i

RE: Date and Time

2002-07-10 Thread Peter Scott
At 12:46 PM 7/10/02 -0400, Kipp, James wrote: > > > > The only problem seems to be the > > use strict; directive > > if I take this out it works fine > > > > So I guess I need to know if the use strict; directive is really > > necessary and if so how do I get around it? > >either take it out or

RE: Date and Time

2002-07-10 Thread Kipp, James
> > The only problem seems to be the > use strict; directive > if I take this out it works fine > > So I guess I need to know if the use strict; directive is really > necessary and if so how do I get around it? either take it out or declare ALL of your variables. -- To unsubscribe, e-m

Re: Date and Time

2002-07-10 Thread jffusion
This is what I have now. #!C:/Perl/bin/perl.exe -w ### # Written by William S. Lyles # July 9 2002 # # The purpose of this program # is to generate a random username # and password, then write the # username and password to a # database file and .htpasswd file # an

Re: Date and Time

2002-07-10 Thread Janek Schleicher
jffusion wrote at Wed, 10 Jul 2002 04:57:25 +0200: > I'm trying to get my script to recognize the date and time. I thought I had it but I >keep getting > errors all over. > ... > sub get_date { > ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$is

Re: Date and Time

2002-07-10 Thread Felix Geerinckx
on Tue, 09 Jul 2002 22:12:52 GMT, [EMAIL PROTECTED] wrote: > I'm trying to get my script to recognize the date and time. > I thought I had it but I keep getting errors all over. > > Please take a look and tell me whats wrong > [...] > sub get_date { > ($sec,$min,$h

Re: Date and Time

2002-07-09 Thread Connie Chan
Do you want$date = "@months[$mon]/$mday/$year"; or $date = "$months[$mon]/$mday/$year"; Rgds, Connie - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, July 10, 2002 10:57 AM Subject: Date and Time > &g

Re: Date and Time

2002-07-09 Thread victor
are you trying to get the localtime in readable format? if so try this print scalar(localtime); Tor. [EMAIL PROTECTED] wrote: > > Hi > > I'm trying to get my script to recognize the date and time. > I thought I had it but I keep getting errors all over. > > Plea

Date and Time

2002-07-09 Thread jffusion
Hi I'm trying to get my script to recognize the date and time. I thought I had it but I keep getting errors all over. Please take a look and tell me whats wrong Thanks # Here we define the variables use strict; my $htpasswd = 'c:\apache\htdocs\members\.htpasswd'; my $databa

Date and Time

2002-07-09 Thread jffusion
Hi I'm trying to get my script to recognize the date and time. I thought I had it but I keep getting errors all over. Please take a look and tell me whats wrong Thanks # Here we define the variables use strict; my $htpasswd = 'c:\apache\htdocs\members\.htpasswd'; my $databa

Re: How to get Date and Time value in a variable

2002-06-12 Thread drieux
On Wednesday, June 12, 2002, at 10:46 , Leila Lappin wrote: [..] > I thought getting the date would be like how it's in a shell script `date` > but it does not seem to be working. Could someone please advise me on > this I tried searching archives on "date" but didn't get anything useful. >

Re: How to get Date and Time value in a variable

2002-06-12 Thread Jeff 'japhy' Pinyan
7;s possible I'm looking in the wrong place. Don't use the shell. Perl provides you with the localtime() and time() functions. perldoc -f localtime perldoc -f time Perhaps if you tell us what format you want the date and time in, we could be of more service. But even before you as

How to get Date and Time value in a variable

2002-06-12 Thread Leila Lappin
Hi all, I thought getting the date would be like how it's in a shell script `date` but it does not seem to be working. Could someone please advise me on this I tried searching archives on "date" but didn't get anything useful. It's possible I'm looking in the wrong place. Thanks in advance

Re: Date and time.

2002-01-04 Thread Jon Molin
Mark-Nathaniel Weisman wrote: > > Hello all, > Sorry about re-hashing old things here, however I've looked through > the older messages and can't seem to come up with an answer. How can you > pull a server based date and time stamp from within a script? Any help >

Date and time.

2002-01-04 Thread Mark-Nathaniel Weisman
Hello all, Sorry about re-hashing old things here, however I've looked through the older messages and can't seem to come up with an answer. How can you pull a server based date and time stamp from within a script? Any help would be greatly appreciated. Thank you, Mark-Nathaniel Weism

Re: date and time

2001-08-16 Thread register
Wothout code and the format of the log file I can only suggest this ... others might have other ideas .. You could read in the line and try to split on the line to put the list elements into a hash ... the key of hte hash would be the converted time/date stamp in epoch then you can loop thro

date and time

2001-08-16 Thread Najamuddin, Junaid
Hi, I am new with Perl if someone can help me out I wrote a script which reads two files and compares them and then prints out what is missing but since the txt files are kind of log files they have time and date column in it what i want is to out put only 2 hours old log after comparing how can i