in reply to surprised by split
$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
|
|---|