If the file has pipes as a delimeter. Do I need to split the line wih pipes?
You are already doing this but you probably want something more like,
@var1 = split/\|/;
Is there any way that I could pass the string to a variable then I would get the path at the end of the string
When you seperate the line with pipes "|" you put the values of the entire line in an array. All you have to do is point the path variable to the last element of the array. Something like,
$path = $var1[$#var1];
Hope this helps, I'm not sure I understood you question properly..
-----
Of all the things I've lost in my life, its my mind I miss the most.