Terminal control/Hiding the cursor: Difference between revisions
Terminal control/Hiding the cursor (view source)
Revision as of 03:52, 5 September 2018
, 5 years agoAdded Perl example
Thundergnat (talk | contribs) m (→{{header|C}}: Remove vanity tags) |
SqrtNegInf (talk | contribs) (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...';
run 'tput', 'civis';
sleep 5;
|