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
Your ‘$sub =’ assignment statement is confusing. Is that a scalar of space-separated paths?
Am I correct in thinking that you want to take the paths listed in $sub and put ones with “text” in to one list and ones without in to another?
Assuming all of the above: