Re: Need help with date-time and output

2007-11-26 Thread Gerald Wheeler
One additional note: The input data, column one has values 1 to 365(6) Thanks J. >>> "Gerald Wheeler" <[EMAIL PROTECTED]> 11/26/2007 9:40 AM >>> I am getting and error: Day '32" out of range 1..31 at ... line 35 for this line: my ( $d, $m, $y ) = ( localtime timelocal 0, 0, 12, $_, 0, $dyr )

Re: Need help with date-time and output

2007-11-26 Thread Gerald Wheeler
I am getting and error: Day '32" out of range 1..31 at ... line 35 for this line: my ( $d, $m, $y ) = ( localtime timelocal 0, 0, 12, $_, 0, $dyr )[ 3, 4, 5 ]; and I don't quite know why.. The value for "$_" should be reset to 1 after Jan 31st.. Output is created through only January 31 Thank

Re: Need help with date-time and output

2007-11-22 Thread Gerald Wheeler
Thanks I'll try in.. J. >>> John W.Krahn <[EMAIL PROTECTED]> 11/21/07 9:26 PM >>> On Wednesday 21 November 2007 09:40, Gerald Wheeler wrote: > John, > I have modified my script as per your suggestions: > > > #!/usr/bin/perl > > use strict; > use warnings; > > my $ifiln = 'abc.csv'; > my $ofiln = '

Re: Need help with date-time and output

2007-11-21 Thread John W . Krahn
On Wednesday 21 November 2007 09:40, Gerald Wheeler wrote: > John, > I have modified my script as per your suggestions: > > > #!/usr/bin/perl > > use strict; > use warnings; > > my $ifiln = 'abc.csv'; > my $ofiln = 'xyz.txt'; > > # get start year () from command line > my($rsvr, $rdt, $dyr) = @

Re: Need help with date-time and output

2007-11-21 Thread Gunnar Hjalmarsson
Gerald Wheeler wrote: Gunnar Hjalmarsson wrote: use Time::Local; sub nextday { my ($y, $m, $d) = split /\//, shift; my $t = timegm 0, 0, 0, $d, $m-1, $y; ($d, $m, $y) = ( gmtime($t+24*60*60) )[3..5]; sprintf '%d/%02d/%02d', $y+1900, $m+1, $d; }

Re: Need help with date-time and output

2007-11-21 Thread Tom Phoenix
On 11/21/07, Gerald Wheeler <[EMAIL PROTECTED]> wrote: > It appears that Date::Calc would do what I need only I do not have > access to additional modules You don't need to be the system administrator to install modules. See the perlmodinstall manpage. http://perldoc.perl.org/perlmodinstall.

Re: Need help with date-time and output

2007-11-21 Thread Gerald Wheeler
I checked and find that I do have the Time::Local module installed The problem is ... how do I increment the day from start to end of the calendar year? If i initially set nextday to: 2007/01/01 how do i easily increment this? It appears that Date::Calc would do what I need only I do not have acces

Re: Need help with date-time and output

2007-11-21 Thread Gerald Wheeler
Gunnar, I checked and find that I do have the Time::Local module installed The problem is ... how do I increment the day from start to end of the calendar year? If i initially set nextday to: 2007/01/01 how do i easily increment this? Thanks >>> Gunnar Hjalmarsson <[EMAIL PROTECTED]> 11/20/2

Re: Need help with date-time and output

2007-11-21 Thread Gerald Wheeler
John, I have modified my script as per your suggestions: ** ++ chomp() returns the number of $/ values that were removed from its argument(s) so that is not what you want to do here. You should probably have chomped the data when you input it. ++ I am attempting to remove the newline character at

Re: Need help with date-time and output

2007-11-21 Thread Gerald Wheeler
First off thanks for the assistance See inline comments: >>> John W.Krahn <[EMAIL PROTECTED]> 11/20/2007 4:31:01 PM >>> On Tuesday 20 November 2007 14:00, Gerald Wheeler wrote: > Running Perl 5.6.1 on Solaris 9 SPARC > No (access to) modules available other than what comes with the basic > perl i

Re: Need help with date-time and output

2007-11-20 Thread Tom Phoenix
On 11/20/07, Eric Krause <[EMAIL PROTECTED]> wrote: > I think he can't download modules. I think he *thinks* he can't download modules. Cheers! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.

Re: Need help with date-time and output

2007-11-20 Thread Gunnar Hjalmarsson
Tom Phoenix wrote: On 11/20/07, Gerald Wheeler <[EMAIL PROTECTED]> wrote: No (access to) modules available other than what comes with the basic perl installation. *** I do NOT know how to increment (and format as "2007/01/01") date so that it crosses over for each new month and know when it is

Re: Need help with date-time and output

2007-11-20 Thread John W . Krahn
On Tuesday 20 November 2007 14:00, Gerald Wheeler wrote: > Running Perl 5.6.1 on Solaris 9 SPARC > No (access to) modules available other than what comes with the basic > perl installation. > > I have a file: ifiln.csv as such: > Julian Day of the year, value > 1,4144.34 > 2,4144.38 > 3,4144.38 [

Re: Need help with date-time and output

2007-11-20 Thread Tom Phoenix
On 11/20/07, Gerald Wheeler <[EMAIL PROTECTED]> wrote: > Running Perl 5.6.1 on Solaris 9 SPARC > No (access to) modules available other than what comes with the basic > perl installation. > *** I do NOT know how to increment (and format as "2007/01/01") date so > that it crosses over for each new