Given segment of code: [code] $string1 = "Hello\nWorld\n"; if ($string1 =~ m/d\n\z/) { print "$string1 is a string "; print "that ends with

Kim Trang

New member
Given segment of code:
Code:
$string1 = "Hello\nWorld\n";
if ($string1 =~ m/d\n\z/) {
  print "$string1 is a string ";
  print "that ends with 'd\\n'.\n";
}
What does the symbol /z does?
A. changes line
B. matches the beginning of a string
C. matches the end of a string
D. none of the mentioned
 

Tìm kiếm

Back
Top