in reply to How can i get a substring from a String?
If you want to replace string "_sip._udp." from the variable, you can use the following code.$qname="_sip._udp.www.google.com"; $qname =~ m/(_sip\._udp\.)(.*)/; $qname1 = $2;
$qname="_sip._udp.www.google.com"; $qname =~ s/(_sip\._udp\.)(.*)/$2/;
|
|---|