in reply to surprised by split

You need to either escape (with a backslash) the '|' in the split expression, or use a different delimiter in the $myline assignment. The '|' has special meaning in the split expression and cannot be used "bare". Both of the following work: $myline = "192.168.0.1|run|C:\run.com|"; ($ip, $appid, $apppath, $extra) = split(/\|/, $myline); print "$apppath\n"; $myline = "192.168.0.1!run!C:\run.com!"; ($ip, $appid, $apppath, $extra) = split(/!/, $myline); print "$apppath\n";