[LUGOS] perl zanka
Dalibor
lugos at ice.si
Thu Jun 16 16:21:13 CEST 2005
Simple as that!!
Matija Grabnar wrote:
> Dalibor wrote:
>
>> Ker nisem vešč programiranja v perlu bi rabil nasvet. Zanima me kako
>> naj izvedem zanko v stilu
>> repeat
>> until keypressed
>
>
> Uprabis Term::Readkey :
> Lahko
> use Term::ReadKey;
> while (!defined($key=Term::ReadKey(10))) {
> print "timeout!\n" unless defined($key);
> }
>
> Seveda lahko das timeout na -1 (kar bo potem zrlo CPU brez veze) ali pa
> na 0, kar bo cakalo v neskoncnost, ce bo treba.
>
> Za vec si preberi perldoc Term::ReadKey
> _______________________________________________
> lugos-list mailing list
> lugos-list at lugos.si
> http://liste2.lugos.si/cgi-bin/mailman/listinfo/lugos-list
>
More information about the lugos-list
mailing list