in reply to Re: marking time during function call
in thread marking time during function call

A simple script would be like

@march = `cleartool find /vobs/41Rational_Val/. -all -print`; while (<@march>) { ### processing... done } print "\n"; close(@march);

This using the Smart Comments module. But it waits until the load of the array finishes before displaying the progress.

Replies are listed 'Best First'.
Re^3: marking time during function call
by QM (Parson) on Jun 17, 2015 at 16:00 UTC
    I don't have time at the moment to do full justice to this, but an (untested!) snippet might look like this:
    open(my $FH, "cleartool find /vobs/41Rational_Val/. -all -print|") or die "Something went wrong\n"; print STDERR "Reading cleartool command, line "; while (<$FH>) { do_something_here; unless ($. % 200) { # every 200 lines print STDERR "$. "; } }

    However, there is no way to know the percent complete progress of the cleartool command.

    -QM
    --
    Quantum Mechanics: The dreams stuff is made of

      QM A Scholar and a Gentleman Thank You. I was able to modify slightly and now have a basic heartbeat while the array is loaded