perl學習札記1--鍵盤輸入

從鍵盤讀輸入,知道口令正確爲止的程序:#!/usr/local/bin/perlprint "Password? "; # Ask for input$a = <STDIN>; # Get inputchop $a; # Remove the newline at endwhile ($a ne "fred") # While input is wrong...{ print "
相關文章
相關標籤/搜索