Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
PS. I can't use modules so I will have to do it that way , can someone advice please thanks#!/usr/bin/perl -w use warnings; use strict; my $start = "Tue Jan 27 15:40:16 2004"; print "This is the start time: $start \n"; system (This is where the system process stuff goes); my $finish = localtime; print "This is the finish time: $finish \n"; my $elapsedtime = ("$finish" - "$start") ; print "This is the time diff: $elapsedtime \n"; The above obviously didn't work. Here's what it returned: This is the start time: Tue Jan 27 15:40:16 2004 Argument "Tue Jan 27 15:40:16 2004" isn't numeric in subtraction (-) a +t C:\Perl\timetest.pl line 13. This is the finish time: Tue Jan 27 19:45:56 2004 This is the time diff: 0 Argument "Tue Jan 27 19:45:56 2004" isn't numeric in subtraction (-) a +t C:\Perl\timetest.pl line ClearCase\Us
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: elapsed times
by Roy Johnson (Monsignor) on Feb 05, 2004 at 22:49 UTC | |
|
Re: elapsed times
by Corion (Patriarch) on Feb 05, 2004 at 22:42 UTC | |
|
Re: elapsed times
by parkprimus (Sexton) on Feb 05, 2004 at 22:49 UTC |