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
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
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
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
>
> 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/
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/
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
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
"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
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
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
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
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
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
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,
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
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
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
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
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
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
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
>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
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
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
Hi All,
How to get date and time in perl ? is there any function for that ?
Regards
Irfan Sayed
> 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
:
Subject: Re: Date and time calculation
Date::Calc
Date::Manip
DateTime
All make this trivial.
> 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
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
> 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
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
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
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>
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
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
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]
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
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
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
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
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!
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
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
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
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
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
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
>
> 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
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
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
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
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
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
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
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
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.
>
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
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
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
>
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
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
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
63 matches
Mail list logo