split function in perl
- by devtech
Hello,
Please kindly help me in the following,
I have $sub = C:\views\sght\gzad\text\hksdk\akldls\hool.java
= C:\views\sght\bdsk\text\hksdfg\sdjks\same.java
= C:\views\jdjk\jhah\fjd\afhlad\sitklds\hgls.jsp
I need to replace every "\" with a "."
I need to split the $sub such a way that
if $sub contains the "text" then split and one variable contains the later part after text like-
$var1 =text.hksdk.akldls.hool.java
text.hksdfg.sdjks.same.java
else
$var2= views.jdjk.jhah.fjd.afhlad.sitklds.hgls.jsp