iowaprogrammer
ISP
I am trying to read a string and have it split into pieces using the split() function. I am using the "/" as the separator to split on, but not sure how to write the split to use the "/".
Input is going to be directory listings like below
/usr/home/<userid>/Trash
/usr/home/<userid>/Sent
/usr/home/<userid>/Trash
/usr/home/<userid>/mbox
I have been trying to do it using the following line...
Thank you for taking time to read this question
Input is going to be directory listings like below
/usr/home/<userid>/Trash
/usr/home/<userid>/Sent
/usr/home/<userid>/Trash
/usr/home/<userid>/mbox
I have been trying to do it using the following line...
Code:
($lvl1, $lvl2, $userid, $filename)= split(///);
Thank you for taking time to read this question