Terminal control/Hiding the cursor: Difference between revisions

Added Perl example
m (→‎{{header|C}}: Remove vanity tags)
(Added Perl example)
Line 243:
}
}</lang>
 
=={{header|Perl}}==
<lang perl>print "\e[?25l"; # hide the cursor
print "Enter anything, press RETURN: "; # prompt shown
$input = <>; # but no cursor
print "\e[0H\e[0J\e[?25h"; # reset, visible again</lang>
 
=={{header|Perl 6}}==
<lang perl6>say 'Hiding the cursor for 5 seconds...';
say 'Hiding the cursor for 5 seconds...';
run 'tput', 'civis';
sleep 5;
2,392

edits