1 #!/usr/bin/perl 2 3 use strict; 4 use warnings; 5 6 foreach(<>) 7 { 8 if (/(w*)/a){print "$1 ";}else{print "no match ";} 9 } 10 11 #11111111111111111111111111111111111 12 #nciuwbufcbew 13 # 14 #x 15 #xw 16 #11111111111111111111111111111111111 17 18 foreach(<>) 19 { 20 if (/(w*)/l){print "$1 ";}else{print "no match ";} 21 } 22 23 #11111111111111111111111111111111111 24 #nciuwbufcbew``````//.]];s[[..; 25 # 26 #x,dsncdk,;l,ex 27 #xw,eocxmcmck 28 #11111111111111111111111111111111111 29 30 foreach(<>) 31 { 32 if (/Ax(.*)/){print "$1 ";}else{print "no match ";} 33 } 34 35 #no match 36 #no match 37 #no match 38 #,dsncdk,;l,ex 39 #w,eocxmcmck 40 #no match 41 42 foreach(<>) 43 { 44 if (/(.*);z/){print "$1 ";}else{print "no match ";} 45 } 46 47 #no match 48 #no match 49 #no match 50 #no match 51 #no match 52 #no match 53 54 foreach(<>) 55 { 56 if (/(.*);/){print "$1 ";}else{print "no match ";} 57 } 58 59 #no match 60 #nciuwbufcbew``````//.]];s[[.. 61 #no match 62 #no match 63 #no match 64 #no match 65 66 foreach(<>) 67 { 68 if (/A(s*)/){print "$1 ";}else{print "no match ";} 69 } 70 71 #no match 72 #no match 73 # 74 # 75 #no match 76 #no match 77 #no match 78 79 $_=' 80 81 oinn 82 nin 83 nin 84 kkkk'; 85 86 if (/(.*)k$/){print "$1 ";}else{print "no match ";} 87 88 # kkk 89 90 if (/^n(.*)/m){print "$1 ";}else{print "no match ";} 91 92 #in