[scripts] Clean up filehandle usage in split_scp.pl (#3285)
* Move to three-arg open() for security reasons: A two-arg open() call is a security flaw, since the filename could affect the method of opening a file. This can be very, *very* risky. If the input comes from the command line, triggered by a system that uses information from the customer to affect filenames, it could *easily* lead to serious security risks. * Replace bareword filehandles with proper variables: When using bareword filehandles, you are creating global variables. Instead, we're using proper scalars for the filehandles. Much safer! This commit also closes filehandles that were left open. Perl tries to implicitly close them for you, but it's better to be explicit.
Loading