split question
Posted: Tue Oct 27, 2009 1:05 pm
I'm trying to do the following and it's not working. Can you tell me what I am doing wrong?
<$dmozdir = /Top/Arts>
<split "/" $dmozdir><$dirq = $ret>
dirq=$dirq
it is giving me dirq=
when I was expecting it to give me dirq= " Top Arts"
and what if I just wanted to pull out the "Arts" portion is there a way to pull the last variable of $dmozdir into $dirq like if I had /Top/Arts/Movies all I want is the last "Movies"
<$dmozdir = /Top/Arts>
<split "/" $dmozdir><$dirq = $ret>
dirq=$dirq
it is giving me dirq=
when I was expecting it to give me dirq= " Top Arts"
and what if I just wanted to pull out the "Arts" portion is there a way to pull the last variable of $dmozdir into $dirq like if I had /Top/Arts/Movies all I want is the last "Movies"