Learn Perl

xiaoxiao2021-03-06  51

#! / usr / bin / perl

Print "Hello, World ... / N"; Printf "Is your name?"; $ name = ; chop ($ name); Printf "Hello $ Name, welcome to the online school! / n" ;

Print "Please enter a string! / n"; $ String = ; # means a standard input, let the user enter a string chop ($ String); # # s s 换 换 换 换 字/ N Delete the IF ($ String! ~ / CGI /) {#! ~ Unpredictable Operator Print ("No CGI this string in the input string! / n"); # If there is no CGI in the input string If this string is, this information will be displayed} Elsif ($ String = ~ / CGI /) {# = ~ Associated Operator Print ("Enter the string in the string! / N"); This information is displayed in the string of the CGI in the string.

# 读 写 文件, assume that the current directory has a file name: Test.txt

转载请注明原文地址:https://www.9cbs.com/read-87949.html

New Post(0)