The /proc filesystem contains details of running processes. For example on Linux if your PID is 123 then the command line of that process will be found in /proc/123/cmdline
The cmdline is using null-bytes to separate the arguments.
I suspect unpack should be used but I don’t know how, my miserable attempts at it using various templates (“x”, “z”, “C*”, “H*”, “A*”, etc.) just did not work.
A simple
split("\0", $line)would do the job just fine.