Re: Time::HiRes output

2017-05-27 Thread SSC_perl
> On May 24, 2017, at 7:17 PM, Chas. Owens wrote: > > Take a look at Devel::NYTProf... Thanks, Chas. I had made a mental note a while back to look into Devel::NYTProf, but it had slipped my mind, so your response was perfectly timed. Just within the first hour of using it,

Re: Time::HiRes output

2017-05-24 Thread lee
"Chas. Owens" writes: > You can use printf or sprintf to control the format, but what you are doing > is called profiling and it is better to use an actual profiler. Take a look > at Devel::NYTProf > > http://search.cpan.org/~timb/Devel-NYTProf-6.04/lib/Devel/NYTProf.pm > > https://www.perl.org/a

Re: Time::HiRes output

2017-05-24 Thread Chas. Owens
You can use printf or sprintf to control the format, but what you are doing is called profiling and it is better to use an actual profiler. Take a look at Devel::NYTProf http://search.cpan.org/~timb/Devel-NYTProf-6.04/lib/Devel/NYTProf.pm https://www.perl.org/about/whitepapers/perl-profiling.html

Re: time based test

2014-02-20 Thread shawn wilson
Thanks Also, for completeness, in that doc is also stated Time::Warp and someone also pointed me to Time::Mock and Test::TimeMock. The later seems to have the best interface for my needs, so I'll go with that. On Sat, Feb 15, 2014 at 6:05 AM, David Precious wrote: > On Fri, 14 Feb 2014 16:21:52

Re: time based test

2014-02-15 Thread David Precious
On Fri, 14 Feb 2014 16:21:52 -0500 shawn wilson wrote: > What I want is to be able to make a program /think/ that it's like a > week in the future without messing with the system time at all. So > something that overrides gmtime and localtime and the like with some > starting point would be aweso

Re: time based test

2014-02-14 Thread shawn wilson
On Fri, Feb 14, 2014 at 5:21 PM, Andy Bach wrote: > > On Fri, Feb 14, 2014 at 3:21 PM, shawn wilson wrote: >> >> What I want is to be able to make a program /think/ that it's like a >> week in the future > > > Not sure ... not understanding this question - which part of the program do > you want

Re: Time::Local (how to handle bad input)

2013-01-09 Thread Bill Stephenson
On Jan 9, 2013, at 11:26 AM, Andy Bach wrote: > On Wed, Jan 9, 2013 at 10:11 AM, Bill Stephenson wrote: > >> date=11/01/2003 >> >> I want to trap bad data sent to time::local in a loop where I use these >> lines: >> >>my ($date_month, $date_day, $date_year) = split(/\//, >> $DOCUMENT-

Re: Time::Local (how to handle bad input)

2013-01-09 Thread Andy Bach
On Wed, Jan 9, 2013 at 10:11 AM, Bill Stephenson wrote: > date=11/01/2003 > > I want to trap bad data sent to time::local in a loop where I use these > lines: > > my ($date_month, $date_day, $date_year) = split(/\//, > $DOCUMENT->param("date")); > > $date_year = ($date_year-1900);

Re: Time based processes

2012-07-25 Thread punit jain
Hi Below is my script where alarm is generated after 15 sec and changes the global variable in parent from 0 to 1. Is there any mistake in my multiprocess approach with time-based stop ? #!/usr/bin/perl use strict; use warnings; use Parallel::ForkManager; my $MAX_PROC=2; $|++; my $stopFlag=0; m

Re: Time based processes

2012-07-21 Thread Dr.Ruud
On 2012-07-21 19:16, punit jain wrote: for my $step ( @steps ) { last if $STOP; I would think the issue here is if the list is 30K long and we are still at 2K why would be really like to process whole list ? We can die or handle exit of the script gracefully in my understanding. Is my und

Re: Time based processes

2012-07-21 Thread punit jain
> > > for my $step ( @steps ) { >last if $STOP; > > > I would think the issue here is if the list is 30K long and we are still > at 2K why would be really like to process whole list ? > We can die or handle exit of the script gracefully in my understanding. > > Is my understanding correct here

Re: Time based processes

2012-07-21 Thread Dr.Ruud
On 2012-07-21 16:20, Dr.Ruud wrote: On 2012-07-21 15:41, punit jain wrote: You can let the ALRM-sub simply set a global variable, like $STOP. Your process should check this before starting a next iteration. I suppose this needs to be set in parent process which means Signal needs to be invok

Re: Time based processes

2012-07-21 Thread Dr.Ruud
On 2012-07-21 15:41, punit jain wrote: You can let the ALRM-sub simply set a global variable, like $STOP. Your process should check this before starting a next iteration. I suppose this needs to be set in parent process which means Signal needs to be invoked in parent. Is my understanding corr

Re: Time based processes

2012-07-21 Thread punit jain
Also for :- > for my $step ( @steps ) { last if $STOP; I would think the issue here is if the list is 30K long and we are still at 2K why would be really like to process whole list ? We can die or handle exit of the script gracefully in my understanding.

Re: Time based processes

2012-07-21 Thread punit jain
For the case which you mentioned :- >You can let the ALRM-sub simply set a global variable, like $STOP. Your process should check this before starting a next iteration. I suppose this needs to be set in parent process which means Signal needs to be invoked in parent. Is my understanding correct ?

Re: Time based processes

2012-07-21 Thread Dr.Ruud
On 2012-07-21 15:30, Dr.Ruud wrote: On 2012-07-21 14:50, punit jain wrote: *(B) How do I stop the script graceful without killing the processes and stop from other sunbprocesses being spanned ?* Just let $SIG{INT} and $SIG{TRM} also set $STOP. s/TRM/TERM/ See `kill -l` for the names. Pe

Re: Time based processes

2012-07-21 Thread Dr.Ruud
On 2012-07-21 14:50, punit jain wrote: *(B) How do I stop the script graceful without killing the processes and stop from other sunbprocesses being spanned ?* Just let $SIG{INT} and $SIG{TRM} also set $STOP. Per child you can update $0, to be able to watch the status of the process in ps.

Re: Time based processes

2012-07-21 Thread Dr.Ruud
On 2012-07-21 14:50, punit jain wrote: I have a requirement where I need to run my perl script for x hours You can let the ALRM-sub simply set a global variable, like $STOP. Your process should check this before starting a next iteration. Beware that each child needs its own alarm. The parent

Re: time format conversion

2011-04-21 Thread Karl Kaufman
- Original Message - From: "Rob Dixon" To: Cc: "shawn wilson" Sent: Thursday, April 21, 2011 1:14 PM Subject: Re: time format conversion On 21/04/2011 10:52, shawn wilson wrote: If its always in that format, just split and define a hash and pass it t

Re: time format conversion

2011-04-21 Thread Rob Dixon
On 21/04/2011 10:52, shawn wilson wrote: On Apr 21/04/2011 5:38 cc wrote: In PHP, there's strtotime(), but there isn't one in Perl that I can find. Why would I want to bloated my core to mess with dates when half of what I do doesn't need that functionality? Because the 'bloat' is very tiny

Re: time format conversion

2011-04-21 Thread shawn wilson
On Apr 21, 2011 12:17 PM, "Karl Kaufman" wrote: > > Alternatives to shawn's response (w/o commenting on relative benefits)... You won't mention the benefits, but I will... :) > > - Original Message - From: "cc" > To: > Sent: Thursday, April 21, 2011 4:37 AM > Subject: time format conver

Re: time format conversion

2011-04-21 Thread Karl Kaufman
Alternatives to shawn's response (w/o commenting on relative benefits)... - Original Message - From: "cc" To: Sent: Thursday, April 21, 2011 4:37 AM Subject: time format conversion Hi, I have two strings that shows different times and I want to find the difference in # of hours.

Re: time format conversion

2011-04-21 Thread shawn wilson
On Apr 21, 2011 5:38 AM, "cc" wrote: > > Hi, > > I have two strings that shows different times and I > want to find the difference in # of hours. > DateTime? search.cpan.org/~drolsky/DateTime-0.66/lib/DateTime.pm > In PHP, there's strtotime(), but there isn't one > in Perl that I can find. > Why

Re: Time Subroutine

2010-10-26 Thread Jeff Peng
于 2010-10-26 22:53, Jyoti 写道: Hello Everyone, Can anyone tell me about the subroutine that returns current time please. perldoc -f localtime Is there much difference if we output current time or uptime ? I'm not sure what's an uptime by your meanings. If it's for the operation system's up

Re: "Time issues"

2009-08-31 Thread Jim Gibson
At 1:01 PM +0530 8/31/09, Ajay Kumar wrote: hi All I have some zip data that contans name of different file when i unzipped data i got hundreds of file i passed each file in a subroutine and parse the data and write into excel sheet i am passing approximate 196 file individually during parsin

Re: "Time issues"

2009-08-31 Thread Chas. Owens
On Mon, Aug 31, 2009 at 03:31, Ajay Kumar wrote: snip > during parsing and writiting into excel script is taking to much cpu > Resources as well as more than one( 1) hour time time to excute > > can anybody tell me how to resolve the cpu and time issues here snip There are many things that can be

Re: "Time issues"

2009-08-31 Thread Tim Bowden
On Mon, 2009-08-31 at 13:01 +0530, Ajay Kumar wrote: > hi All > > I have some zip data that contans name of different file > when i unzipped data i got hundreds of file i passed each file in a > subroutine and parse the data and write into excel sheet > i am passing approximate 196 file individ

Re: Time stamp in file name.

2009-07-08 Thread Meghanand Acharekar
2009/7/8 Alexander Koenig > Hi again, > > You wrote on 07/08/2009 10:14 AM: > > > But still a bit curios about this > > if I do > > $middle=`date +%F`; > > I get result ( the new line prob), > > > > New File name : log_2009-07-07 > > .gz > > > > It there any way to do it using this (Using date co

Re: Time stamp in file name.

2009-07-08 Thread John W. Krahn
Meghanand Acharekar wrote: Hi, Hello, Thanx for helpIt was a silly mistake, I put a '\n' due to usual practice , The prob is resolved, by not using join. Now $middle=sprintf "%4d-%02d-%02d",$year+1900,$mon+1,$mday; and $file_name=$prefix."_".$middle.$suffix; Or just: my $file_name = sp

Re: Time stamp in file name.

2009-07-08 Thread Alexander Koenig
Hi again, You wrote on 07/08/2009 10:14 AM: > But still a bit curios about this > if I do > $middle=`date +%F`; > I get result ( the new line prob), > > New File name : log_2009-07-07 > .gz > > It there any way to do it using this (Using date command). That's because the date output includes a

Re: Time stamp in file name.

2009-07-08 Thread Meghanand Acharekar
Hi, Thanx for helpIt was a silly mistake, I put a '\n' due to usual practice , The prob is resolved, by not using join. Now $middle=sprintf "%4d-%02d-%02d",$year+1900,$mon+1,$mday; and $file_name=$prefix."_".$middle.$suffix; But still a bit curios about this if I do $middle=`date +%F`; I get

Re: Time stamp in file name.

2009-07-08 Thread Alexander Koenig
I wrote on 07/08/2009 09:50 AM: >> #!/usr/bin/perl -w >> # Prog for demostrating file name concatenations. >> $prefix="log"; >> $suffix=".gz"; >> >> ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(time); >> # Time >> $middle=sprintf "%4d-%02d-%02d \n",$year+1900,$mon+1,$mday; >> pr

Re: Time stamp in file name.

2009-07-08 Thread Alexander Koenig
Hi, You wrote on 07/08/2009 09:35 AM: > #!/usr/bin/perl -w > # Prog for demostrating file name concatenations. > $prefix="log"; > $suffix=".gz"; > > ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(time); > # Time > $middle=sprintf "%4d-%02d-%02d \n",$year+1900,$mon+1,$mday; > pri

Re: Time::Piece capturing parsing problems

2008-02-28 Thread Paul Lalli
On Feb 28, 2:22 am, [EMAIL PROTECTED] (Myf White) wrote: > Hi everyone, > > I think my question relates to STDOUT rather than Time::Piece but I'm not > sure. > > I am trying to use Time::Piece to process and convert a string which may be > a bit dodgy. What I can't understand is how to capture the

Re: Time::Piece capturing parsing problems

2008-02-28 Thread Gunnar Hjalmarsson
Myf White wrote: I think my question relates to STDOUT rather than Time::Piece but I'm not sure. I am trying to use Time::Piece to process and convert a string which may be a bit dodgy. What I can't understand is how to capture the problem. The following code only captures the problem with the s

Re: Time Comparison Easier Than I'm Making them

2007-11-28 Thread Rob Dixon
Mathew Snyder wrote: > I've got an application which uses the format -mm-dd hh:mm:ss for its timestamping. I'm trying to determine if the time a record was created was 5 or more minutes before the time the script runs. Using DateTime->now I get a timestamp of -mm-ddThh:mm:ss. I have no

Re: Time Comparison Easier Than I'm Making them

2007-11-28 Thread Paul Lalli
On Nov 28, 9:50 am, [EMAIL PROTECTED] (Mathew Snyder) wrote: > I've got an application which uses the format -mm-dd hh:mm:ss for its > timestamping. I'm trying to determine if the time a record was created was 5 > or > more minutes before the time the script runs. Using DateTime->now I get a

Re: Time Comparison Easier Than I'm Making them

2007-11-28 Thread Gunnar Hjalmarsson
Mathew Snyder wrote: I've got an application which uses the format -mm-dd hh:mm:ss for its timestamping. I'm trying to determine if the time a record was created was 5 or more minutes before the time the script runs. use Date::Parse; my $rectime = str2time '2007-11-28 16:40:11';

Re: Time Comparison Easier Than I'm Making them

2007-11-28 Thread Steve Bertrand
>> All I'm trying to do is take the hh:mm:ss portion of each timestamp I completely missed this portion of your message. As per perldoc DateTime: $hms= $dt->hms; ...which will populate $hms with just hh:mm:ss. TFM also states how to do comparisons, additions, subtractions et al. Cheers!

Re: Time Comparison Easier Than I'm Making them

2007-11-28 Thread Steve Bertrand
Mathew Snyder wrote: > I've got an application which uses the format -mm-dd hh:mm:ss for its > timestamping. I'm trying to determine if the time a record was created was 5 > or > more minutes before the time the script runs. Using DateTime->now I get a > timestamp of -mm-ddThh:mm:ss. I

Re: Time stamp not updating

2007-07-15 Thread Craig McKenzie
On 7/13/07, Mr. Shawn H. Corey <[EMAIL PROTECTED]> wrote: CM Analyst wrote: > Hi, > In the following script, I am inserting a time stamp. > The problem is that the time stamp ($sec) is not > incrementing. > > What am I doing wrong? > > > open (PORT, "+>COM1") || die "Can't Open Port\n"; > open

Re: Solved: Re: Time stamp not updating

2007-07-13 Thread Dr.Ruud
CM Analyst schreef: > my ($sec, $min, $hour, > $mday, $mon, $year, > $wday, $yday, $isdst) = localtime(); You don't have to allocate variables for the values that you don't need, so in your case this might be sufficient: my ($sec, $min, $hour) = localtime; If you need

Solved: Re: Time stamp not updating

2007-07-13 Thread CM Analyst
Dear All, The following works for me. # use strict; use warnings; use Win32::SerialPort; use IO::Select; use IO::File; use IO::Handle; use Time::Local; # Serial Settings open (PORT, "+>COM1") || die "Can't Open Port\n"; open (LOG, "> c:\\temp\\logdata.txt") || die "Can't Open File

Re: Time stamp not updating

2007-07-13 Thread Mr. Shawn H. Corey
CM Analyst wrote: Hi, In the following script, I am inserting a time stamp. The problem is that the time stamp ($sec) is not incrementing. What am I doing wrong? open (PORT, "+>COM1") || die "Can't Open Port\n"; open (LOG, "> c:\\temp\\logdata.txt") || die "Can't Open File\n"; while ( ) { #p

Re: Time stamp not updating

2007-07-13 Thread Chas Owens
On 7/13/07, CM Analyst <[EMAIL PROTECTED]> wrote: snip What am I doing wrong? snip As far as I can see from the code you posted $hour, $min, and $sec shouldn't even have values. Scalars don't magically change value (unless they are tied, but that is magic), so you must put something inside the

Re: time limited STDIN

2007-01-04 Thread Saurabh Singhvi
Thanks a lot ! That does it :) On 1/4/07, Dave Gray <[EMAIL PROTECTED]> wrote: On 1/4/07, Saurabh Singhvi <[EMAIL PROTECTED]> wrote: > Hi all, > > I wanted to know a way of taking a time limited STDIN. Say for eg > after 3 seconds, the STDIN should stop waiting and move forward. > > How do I d

Re: time limited STDIN

2007-01-04 Thread Dave Gray
On 1/4/07, Saurabh Singhvi <[EMAIL PROTECTED]> wrote: Hi all, I wanted to know a way of taking a time limited STDIN. Say for eg after 3 seconds, the STDIN should stop waiting and move forward. How do I do this?? I was trying with unless ($child) { sleep($waittime); `echo "\n"`

Re: Time format

2006-11-15 Thread John W. Krahn
Jm lists wrote: > Hi members, Hello, > I want to get this format of time: > > 11.07.06 12:00 pm > > can you tell me how to get it?(maybe need to be translated from the > 'localtime') Thanks. use POSIX 'strftime'; my $date = strftime '%m.%d.%y %I:%M %p', localtime; John -- Perl isn't a tool

Re: Time format

2006-11-15 Thread Rob Dixon
Jm lists wrote: Hi members, I want to get this format of time: 11.07.06 12:00 pm can you tell me how to get it?(maybe need to be translated from the 'localtime') Thanks. Is that 11 July or 7 November? Swap the day and month around in the output format in the program below if you wanted the l

Re: Time format

2006-11-15 Thread Jm lists
Very cool!Thanks. 2006/11/15, Ricardo SIGNES <[EMAIL PROTECTED]>: * Jm lists <[EMAIL PROTECTED]> [2006-11-15T09:57:44] > Hi members, > > I want to get this format of time: > > 11.07.06 12:00 pm > > can you tell me how to get it?(maybe need to be translated from the > 'localtime') Thanks. Consu

Re: Time format

2006-11-15 Thread Ricardo SIGNES
* Jm lists <[EMAIL PROTECTED]> [2006-11-15T09:57:44] > Hi members, > > I want to get this format of time: > > 11.07.06 12:00 pm > > can you tell me how to get it?(maybe need to be translated from the > 'localtime') Thanks. Consult "perldoc -f localtime": #012 3 45

Re: Time::Local let me faint

2006-08-29 Thread John W. Krahn
Jeff Pang wrote: >>So if you want to translate 31 August 2006 you have to subtract one from the >>month and 1900 from the year: >> >>$ perl -Mstrict -MTime::Local -le 'print timelocal(0,0,0,31,7,106)' >>1157007600 > > John, > > For the instance described by you,both '2006' and '106' are right. >

Re: Time::Local let me faint

2006-08-29 Thread Jeff Pang
> >So if you want to translate 31 August 2006 you have to subtract one from the >month and 1900 from the year: > >$ perl -Mstrict -MTime::Local -le 'print timelocal(0,0,0,31,7,106)' >1157007600 John, For the instance described by you,both '2006' and '106' are right. $ perl -Mstrict -MTime::Loca

Re: Time::Local let me faint

2006-08-29 Thread John W. Krahn
Practical Perl wrote: > Hello,lists, Hello, > Please see these two lines' output: > > [$ perl -Mstrict -MTime::Local -le 'print timelocal(0,0,0,31,8,2006)' > Day '31' out of range 1..30 at -e line 1 > > $ perl -Mstrict -MTime::Local -le 'print timelocal(0,0,0,31,7,2006)' > 1156953600 > > > I

Re: Time::Local let me faint

2006-08-29 Thread Flemming Greve Skovengaard
Practical Perl wrote: Hello,lists, Please see these two lines' output: [$ perl -Mstrict -MTime::Local -le 'print timelocal(0,0,0,31,8,2006)' Day '31' out of range 1..30 at -e line 1 $ perl -Mstrict -MTime::Local -le 'print timelocal(0,0,0,31,7,2006)' 1156953600 I translate the time of '2006-

Re: Time::Local let me faint

2006-08-29 Thread Practical Perl
Thank you,:-) For the intuition I treated '8' as August in Time::Local's method...A low-level mistake. 2006/8/30, Lawrence Statton XE1/N1GAK <[EMAIL PROTECTED]>: Because SEPTEMBER only has thirty days. 0 - January; 1 - February; 2 - March; ... --L -- To unsubscribe, e-mail: [EMAIL PROTEC

Re: Time::Local let me faint

2006-08-29 Thread Adriano Ferreira
On 8/29/06, Practical Perl <[EMAIL PROTECTED]> wrote: But when I translate the time of '2006-8-31 00:00:00' to unix timestamp,it said '31 out of range'. I'm so faint that August doesn't have 31th day?Please tell me why this happen and how to resolve it. from "perldoc Time::Local" It is w

Re: Time::Local let me faint

2006-08-29 Thread Lawrence Statton XE1/N1GAK
Because SEPTEMBER only has thirty days. 0 - January; 1 - February; 2 - March; ... --L -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: time()

2006-01-21 Thread Tom Phoenix
On 1/21/06, Rick Triplett <[EMAIL PROTECTED]> wrote: > I time stamp a lot of my file interactions with $stamp = time(), but > about one out of a hundred or so stamps gives me the system epoch > date instead of the true date. If your time() function ever gives you the epoch (zero or undef), that's

Re: Time::Local

2005-12-15 Thread Shawn Corey
richard lavoie wrote: Hi dear list, I'm trying to write a little script for calculation with time like adding a few minutes to a certain time. I'm getting this message: Time::Local version 1134653954 required--this is only version 1.1 at /usr/lib/perl5/5.8.6/Exporter/Heavy.pm line 121. BEG

Re: Time::localtime help

2005-05-16 Thread John W. Krahn
Matt Kopeck wrote: Hi, Hello, I have the following code: use strict; use Time::localtime; my $now = localtime; printf("The current date is %04d-%02d-%02d\n", $now->year+1900, ($now->mon)+1, $ now->mday); It outputs the date in such a format: "The current date is 2005-05-16". I would like the name

RE: Time::localtime help

2005-05-16 Thread Charles K. Clarkson
Matt Kopeck wrote: : use strict; : : use Time::localtime; : my $now = localtime; : : printf("The current date is %04d-%02d-%02d\n", $now->year+1900, : ($now->mon)+1, $ : now->mday); : : It outputs the date in such a format: "The current date is : 2005-05-16". I woul

Re: Time::localtime help

2005-05-16 Thread Peter Rabbitson
> printf("The current date is %04d-%02d-%02d\n", $now->year+1900, > ($now->mon)+1, $ > now->mday); > > It outputs the date in such a format: "The current date is 2005-05-16". > I would like the name of the month(ex. 'May') displayed instead of 05. > What is the easiest way to do this? > The mos

RE: time manipulation

2004-10-17 Thread John Bruin
I performed a similar process using 2 modules: Date::Parse (to convert date strings to unix seconds) POSIX (strftime function) and Perls standard localtime function to convert back from unix seconds to a formatted date string POSIX is a standard module so your system probably already has it. J

RE: time manipulation

2004-10-14 Thread Bob Showalter
Patricio Bruna V. wrote: > i need to do some calc with dates, time betwen one date and other, are > any modules that you recommend? I think the DateTime family of modules is the direction things are heading. http://datetime.perl.org See also a neat (although a bit dated) high-level view at: htt

Re: time manipulation

2004-10-14 Thread Wiggins d Anconia
> i need to do some calc with dates, time betwen one date and other, are > any modules that you recommend? > > thx > There are several available from CPAN. Date::Calc, Date::Manip, DateTime to name just a few notables. You can also usually do calculations in seconds and use Time::Local and 'loc

Re: time function

2004-09-20 Thread Gunnar Hjalmarsson
[EMAIL PROTECTED] wrote: I was wondering if I can get some help on this. I a function to which I pass the current time. Let's call it func. I call it as follows: $joe = func(time); Now how do I use "time" but add one minute to it? For instance since time will give me the current time, how do I tell

Re: time function

2004-09-20 Thread JupiterHost.Net
[EMAIL PROTECTED] wrote: Greetings earthlings, Hello, I was wondering if I can get some help on this. I a function to which I pass the current time. Let's call it func. I call it as follows: $joe = func(time); Now how do I use "time" but add one minute to it? For instance since time will perl -e '

Re: Time Trigger in perl.....

2004-09-16 Thread Wiggins d'Anconia
Roime bin Puniran wrote: I want to set a time that, when the program tringer catch that expected time, the program will run...how can i write it in perl..can anybody give a hint... Sorry, my english is not well... Thanks Check out the C function, it is specifically for this purpose. perldoc -f ala

Re: Time Skip

2004-09-16 Thread John W. Krahn
Anish Kumar K. wrote: $filename = "data_logfile" .(localtime). ".txt"; open(LOG, ">>$filename") || die "cannot append: $!"; when I compile the file is says "Invalid argument". This is because of the colon character. Suppose after one activity I want to update the log activities in one file say da

Re: Time Skip

2004-09-16 Thread Chris Devers
On Thu, 16 Sep 2004, Jenda Krynicky wrote: > From: Chris Devers <[EMAIL PROTECTED]> > > On Thu, 16 Sep 2004, Anish Kumar K. wrote: > > > $filename = "data_logfile" .(localtime). ".txt"; > > > open(LOG, ">>$filename") || die "cannot append: $!"; > > > > > > > > > when I compile the file it says "

Re: Time Skip

2004-09-16 Thread Jenda Krynicky
From: Chris Devers <[EMAIL PROTECTED]> > On Thu, 16 Sep 2004, Anish Kumar K. wrote: > > $filename = "data_logfile" .(localtime). ".txt"; > > open(LOG, ">>$filename") || die "cannot append: $!"; > > > > > > when I compile the file it says "Invalid argument". This is because > > of the colon charac

RE: Time Skip

2004-09-16 Thread Jim
> > $filename = "data_logfile" .(localtime). ".txt"; open(LOG, > ">>$filename") || die "cannot append: $!"; > > > when I compile the file is says "Invalid argument". This is > because of the colon character. > You have answered your own question :). You can't use the : char in the creatio

Re: Time Skip

2004-09-16 Thread Chris Devers
On Thu, 16 Sep 2004, Anish Kumar K. wrote: > $filename = "data_logfile" .(localtime). ".txt"; > open(LOG, ">>$filename") || die "cannot append: $!"; > > > when I compile the file it says "Invalid argument". This is because of > the colon character. It is? Why? That colon looks pretty innocent

RE: time managing

2004-09-15 Thread Stout, Joel R
Microsoft Scheduler also sucks but not quite as bad as "at". I'd look into the Windows Cron first but you can also run a daemon (below). #your shebang use strict; use POSIX; # Start the loop for the daemon while(1) { my(@now) = localtime(); my($today) = POSIX::strftime( "%m

RE: time managing

2004-09-15 Thread Jenda Krynicky
;s what it is basically designed > to do. I don't say that I am a Unix guru and I might be missing > something here. > > -Original Message- > From: Wiggins d Anconia [mailto:[EMAIL PROTECTED] > Sent: Wednesday, September 15, 2004 9:21 AM > To: NandKishore.Sagi; Ishw

RE: time managing

2004-09-15 Thread NandKishore.Sagi
thing here. -Original Message- From: Wiggins d Anconia [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 15, 2004 9:21 AM To: NandKishore.Sagi; Ishwor; Perl Beginners List; Budi Santosa Subject: RE: time managing Please bottom post... > CRON the one and the best solution to all your problems

RE: time managing

2004-09-15 Thread Wiggins d Anconia
service in user land that generally gets started at boot time. > > Hope this helps. > > Nandu http://danconia.org > > -Original Message- > From: Ishwor [mailto:[EMAIL PROTECTED] > Sent: Wednesday, September 15, 2004 9:03 AM > To: Perl Beginners List > Cc:

Re: time managing

2004-09-15 Thread Wiggins d Anconia
Please bottom post... > I am not a guru for Unix or Perl but i suppose u could to write a call > to a function that > * Pulls the job > * wait for an hour after every pull? maybe using something like wait()? > If anyone else could give a pointer on how to do the second point. > Would be great. > C

RE: time managing

2004-09-15 Thread Bob Showalter
Budi Santosa wrote: > Chris and Scott, > Thanks for your information. Unfortunately, I use > windows-based Komodo as my Perl platform. > Is there any cron function in this platform? Windows has an "at" scheduler that, frankly, sucks big time. Here's a perl cron for windows: http://cronw.sourcefor

RE: time managing

2004-09-15 Thread NandKishore.Sagi
el. Hope this helps. Nandu -Original Message- From: Ishwor [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 15, 2004 9:03 AM To: Perl Beginners List Cc: Budi Santosa Subject: Re: time managing I am not a guru for Unix or Perl but i suppose u could to write a call to a function that *

Re: time managing

2004-09-15 Thread Ishwor
I am not a guru for Unix or Perl but i suppose u could to write a call to a function that * Pulls the job * wait for an hour after every pull? maybe using something like wait()? If anyone else could give a pointer on how to do the second point. Would be great. Cheers On Wed, 15 Sep 2004 09:35:01 -

Re: time managing

2004-09-15 Thread Budi Santosa
Chris and Scott, Thanks for your information. Unfortunately, I use windows-based Komodo as my Perl platform. Is there any cron function in this platform? Budi --- Chris Devers <[EMAIL PROTECTED]> wrote: > On Wed, 15 Sep 2004, Budi Santosa wrote: > > > What do you mean with a cron job? > >

Re: time managing

2004-09-15 Thread Chris Devers
On Wed, 15 Sep 2004, Budi Santosa wrote: > What do you mean with a cron job? You're going to have to take some initiative to figure some of these things out with a search engine. Here's the first hit when you put "cron" into Google:

RE: time managing

2004-09-15 Thread NIPP, SCOTT V \(SBCSI\)
EMAIL PROTECTED] Web: http:\\ldsa.sbcld.sbc.com -Original Message- From: Budi Santosa [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 15, 2004 8:19 AM To: Perl Beginners List Subject: Re: time managing Hi Chris, What do you mean with a cron job? thanks Budi --- Chris Devers <[

Re: time managing

2004-09-15 Thread Budi Santosa
Hi Chris, What do you mean with a cron job? thanks Budi --- Chris Devers <[EMAIL PROTECTED]> wrote: > On Wed, 15 Sep 2004, Budi Santosa wrote: > > > Does anybody know how to extract web content for > each > > hour during one day period? > > Write a script using LWP::Simple or other aspects of >

Re: time managing

2004-09-15 Thread Chris Devers
On Wed, 15 Sep 2004, Budi Santosa wrote: > Does anybody know how to extract web content for each > hour during one day period? Write a script using LWP::Simple or other aspects of LWP. Make sure it does what you want. Then install it as a cron job meant to run once an hour. -- Chris Devers

Re: Time stamping a process in a log file

2004-06-28 Thread Gunnar Hjalmarsson
Jason Corbett wrote: i want to use the sub routine to time stamp processes and such whenever i need to. So, I wrote this below to call the routine into a variable $process_date. Is there a better way to read the date into a variable and use it? Yes. Use Perl's built in function for the purpose:

Re: Time stamping a process in a log file

2004-06-28 Thread JupiterHost.Net
jason corbett wrote: i want to use the sub routine to time stamp processes and such whenever i need to. So, I wrote this below to call the routine into a variable $process_date. Is there a better way to read the date into a variable and use it? For one you should scope it if its a function. IE

Re: Time stamping a process in a log file

2004-06-28 Thread John W. Krahn
Jason Corbett wrote: > > i want to use the sub routine to time stamp processes and such whenever > i need to. So, I wrote this below to call the routine into a variable > $process_date. Is there a better way to read the date into a variable > and use it? Yes, use localtime() or POSIX::strftime().

RE: Time

2004-06-17 Thread Wiggins d Anconia
PROTECTED] > > Sent: 16 June 2004 01:18 > > To: [EMAIL PROTECTED] > > Cc: [EMAIL PROTECTED]; 'Mandar Rahurkar' > > Subject: Re: Time > > > > Your script appears to break every 4th year > > > > http://danconia.org > > > > C

RE: Time

2004-06-17 Thread Chris Welch
TED] > Cc: [EMAIL PROTECTED]; 'Mandar Rahurkar' > Subject: Re: Time > > Your script appears to break every 4th year > > http://danconia.org > > Chris Welch wrote: > > The attached text file is an example of a calendar I've used for CGI > &g

Re: Time

2004-06-15 Thread Wiggins d'Anconia
Your script appears to break every 4th year http://danconia.org Chris Welch wrote: The attached text file is an example of a calendar I've used for CGI purposes (I should point out this is not entirely my script, it's modified by me but the original was by a friend of mine.) -Original Mess

RE: Time

2004-06-15 Thread Chris Welch
The attached text file is an example of a calendar I've used for CGI purposes (I should point out this is not entirely my script, it's modified by me but the original was by a friend of mine.) > -Original Message- > From: Mandar Rahurkar [mailto:[EMAIL PROTECTED] > Sent: 15 June 2004 23:22

Re: Time

2004-06-15 Thread Randy W. Sims
On 6/15/2004 6:21 PM, Mandar Rahurkar wrote: Hello All, I was wondering if there any module in perl which will let me add dates taking care of all the complications (i.e.,) if day is greater than 30 change month and so on. The upcoming standard is the DateTime family of modules. Howeve

Re: Time

2004-06-15 Thread Wiggins d Anconia
> Hello All, >I was wondering if there any module in perl which will let me > add dates taking care of all the complications (i.e.,) if day is greater > than 30 change month and so on. > Check CPAN for, Date::Calc Date::Manip Depending on how fancy you need to get, you can also us

RE: Time off my 8 hours on WP XP Prof

2004-04-20 Thread Wagner, David --- Senior Programmer Analyst --- WGO
WC -Sx- Jones wrote: > Charles K. Clarkson wrote: >> Wagner, David --- Senior Programmer Analyst --- WGO >> <[EMAIL PROTECTED]> wrote: > > : 0927 PDT I get 1627 PDT. Now I can do thie my a MKS Kornshell >>> or MS command prompt. >>> >>> I have tried TZ=PDT, but this seems to have no effect.

Re: Time off my 8 hours on WP XP Prof

2004-04-20 Thread WC -Sx- Jones
Charles K. Clarkson wrote: Wagner, David --- Senior Programmer Analyst --- WGO <[EMAIL PROTECTED]> wrote: : 0927 PDT I get 1627 PDT. Now I can do thie my a MKS Kornshell : or MS command prompt. : : I have tried TZ=PDT, but this seems to have no effect. It sounds like the time zone for whatever P

RE: Time off my 8 hours on WP XP Prof

2004-04-20 Thread Charles K. Clarkson
Wagner, David --- Senior Programmer Analyst --- WGO <[EMAIL PROTECTED]> wrote: : : I have looked at machine and looked at two others (one : running xp prof and one w2k). They both come back with the : correct time. The time on the machine is correct, but for : 0927 PDT I get 1627 PDT. Now

Re: Time::Format

2004-01-26 Thread Owen
On Mon, 26 Jan 2004 14:57:35 -0500 "Paul Kraus" <[EMAIL PROTECTED]> wrote: > Since I added use Time::Format qw( %time } I get this error on any die > statement or end of program. > > Everything runs fine and the program works fine it just dumps this at the > end. > > Can't locate I18N/Langinfo.p

  1   2   >