in reply to Running in 'RealTime'
you wanna read perldoc perlfork, and do something like (this being the simple example, probably not useful)
GUI toolkits such as wxPerl and perlTk work much better for doing things like this, since well, they are gui tools. There is also various Curses modules on CPAN, for creating console gui programs (before windows, like dos), but I can't run any on windows ;)use strict; $| = 1; # disable buffering, read perldoc perlvar my $pid = fork; die "couldn't fork" unless defined $pid; if($pid == 0) { # it's a kid print "type:"; while(<STDIN>){ print qq{you typed "$_"\n\ntype:"}; } } else { while(1) { print "\n\t\t",scalar localtime,"\n"; sleep 1; } }
____________________________________________________
** The Third rule of perl club is a statement of fact: pod is sexy.
|
|---|