[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: bash, perl, C



On Sat, Jan 08, 2005 at 10:32:57AM +1300, Andrew Walbran wrote:
> On Sat, 08 Jan 2005 6:28 am, Gerard Robin wrote:
> > Hello,
> > can someone explain to me if it is possible that the functions sleep of C
> > and Perl work like the function sleep of bashin this scripts and program:
> 
> 'man 1 sleep' explains what sleep does in bash; 'man 3 sleep' explains what 
> sleep does in C.

I think that my question was not very clear.

timerest3.pl in fact is a subroutine in a little script Perl that I wrote 
myself ( I am not a student who expect that others do his work :-))
In that subroutine I wrote
......
while ($i < 6) {
print "\e[0;46;31m", 5-$i, "\e[0m";
`sleep 1`; # the sleep of the shell
print "\r";
.......
If i use the sleep of Perl there nothing is displayed at though with the sleep 
of the shell the numbers 5 4 3 2 1 0 are displayed as I want.
And, I don't understand why the sleep of Perl doesn't work ?
I think it is not coherent to use the sleep of the shell whereas Perl has such 
function. And I tried to write this function in C to rewrite my program in
C ..... but the C function sleep in C works like in Perl ...

But I accept that my problem is irrelevant with the list debian-user.
I apologise for having disturb you.

Thanks.

-- 
Gérard 
 



Reply to: