You might want to scan down the man page for the perl debugger ("perldoc perldebug") to the section about "The Perl Profiler". If you put each of your system calls into its own little perl subroutine, then run the script as follows:
perl -d:DProf your_script.pl
the script will do what it normally does, and while it's doing that, the perl interpreter will be saving tons of trace and timing information to a file in your current directory. After the run is over, you can get a summary that profiles the time spent in each subroutine (i.e. running each system call) by running this utility that comes as part of the Perl distribution:
dprofpp tmon.out
(where "tmon.out" is the name that the debugger's profiling module assigns to the trace file that it creates, as explained in the perldebug man page).

In reply to Re: printing date on a file by graff
in thread printing date on a file by chuleto1

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.