The following code below is in a perl script that is executed on windows OS
What do the following means:
open(CMD, "$cmd 2>&1 |");
$oldh = select(CMD);
$| = 1;
select($oldh);
Can anyone please explain? Is there any point of writing this code? Because, first we are selecting "CMD" as a new filehandle, and then after 1 statement "$|=1" (literally doing nothing), we are again jumping back to the old filehandle ($oldh).