Mega Code Archive

 
Categories / Perl / Language Basics
 

Match

$text = 'earlynowlate'; $text =~ /now/; print "Prematch: \"$`\" Match: \"$&\" Postmatch: \"$'\"\n";