in reply to surprised by split

The pipe symbol "|" is a special character. You need to escape it with a backslash "\" before you can use it inside a string. Here is the right way to do it:

$myline = "192.168.0.1\|run\|C:\\run.com\|";
($ip, $appid, $apppath, $extra) = split(/\|/, $myline);
print "$apppath\n";

This will give you exactly what you want:

C:\run.com

If you don't want to bother with escaping the pipe symbol, avoid using the pipe symbol and pick another character as the field separator instead.

roytc