Perl практика

         

Секретное слово.


#!/usr/local/bin/perl -w print "What is you name? "; $name = <STDIN&gt ; chomp($name); $secretword = "hmm"; if($name eq "German") { print "Hello, German! Good of you to be here!\n"; } else { print "Hello, $name! \n"; print "What is the secret word? "; $guess = <STDIN&gt ; while($guess ne $secretword) { print "Wrong, try again. What is the secret word? "; $guess = <STDIN&gt ; chomp($guess); } }



Содержание раздела