Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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 drinking their drinks and smoking their pipes about the Monastery: (12)
As of 2014-10-23 19:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (128 votes), past polls