in reply to Re^2: File::Find with sudo from root
in thread File::Find with sudo from root
I'm not as familar with the "$/ = chr(0);" line. I know it changes the line termintion which I'm assuming is necessary to properly take in the pipe from find.
This is correct. In this example, find gets the -print0 option, which causes it to terminate file names with a null character (chr(0) or "\000") instead of a newline. This is useful because filenames can't contain a null, but they can contain a newline.
I'd agree also with your use of local to scope the change to $/.
|
|---|