use Thread;
+sub counter {
+$count = 10;
+while ($count--) {
+ sleep 1;
+ print "ping $count\n";
+}
+}
+
sub reader {
my $line;
while ($line = <STDIN>) {
the terminal/stdin.
EOT
-$r = new Thread \&reader;
+$r = new Thread \&counter;
+
+&reader;
+
+__END__
+
+
$count = 10;
while ($count--) {
sleep 1;