Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: using perl to "press enter"

by Not_a_Number (Parson)
on Dec 05, 2012 at 20:33 UTC ( #1007389=note: print w/ replies, xml ) Need Help??


in reply to using perl to "press enter"

This seems to work for me:

use strict; use warnings; use Win32::Console; my $console = Win32::Console->new( STD_OUTPUT_HANDLE ); my $timerlength = 5; # or whatever while ( 1 ) { sleep $timerlength; $console->Write( "\n" ); }

If you have ActiveState perl, Win32::Console is packaged with it.


Comment on Re: using perl to "press enter"
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1007389]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2015-07-05 06:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls