hello everyone,
i am attempting to run the sleep function (i've also tried select) during the execution of a command to mimic a status. for example:
# this is a terminal screen
# here the process is executed
# below this a status is displayed while the command executes like so:
..................................................done
however, when i use sleep or select, they delay the command. how can i separate the two?
i have done this in shell scripts before using ps, grep, and awk; however, i'd like to pull this off in
perl if possible...
here is what i have:
Code:
open CMD "$cmd |";
while(<CMD>) {
print '.';
# future code to log the output of CMD
sleep 1;
# select(undef, undef, undef, 0.5);
}