Я помню, когда я кодировал Java, там была команда, которая воспринимала щелчок мышью или нажатие клавиши. Могли бы вы как-нибудь сделать то же самое, но в perl? Примерно так
print "\n", "Press the 'I' key for instructions", "\n";
my $a = readline STDIN;
chomp $a;
#This next line is what is what I'm thinking of
if (keyPressed eq "I" || "i")
{
print "\n", "Instructions: blah, blah, blah", "\n";
}
print "\n", "Click your mouse if you want to exit the instructions", "\n";
while (mouseClicked = True)
{
print "\n", "Press the 'I' key for instructions", "\n";
if (keyPressed eq "I" || "i")
{
print "\n", "Instructions: blah, blah, blah", "\n";
}
print "\n", "Click your mouse if you want to exit the instructions", "\n";
}
Примерно так. Главный вопрос: есть ли mouseClicked или keyPressed (Java) в perl?