in reply to sed deleting file

Its always a good idea to do basic status checking of even the most trivial system call. There's always a chance of failure on a live system. For example:
system "sed 's/,)/)/' pbxiplp > pbxiplp1" and die "system call failed: $!";
See also system.