The 2>&1 line means redirect standard handle 2 to standard handle 1. In other words, take all input that would go to STDERR and redirect it to STDOUT. Why is this beneficial? Well, when you open a process this way only the STDOUT output gets to your Perl program through the opened filehandle. If you want error messages as well you need to redirect the STDERR file handle as has been done here.
In reply to Re: Can someone explain how this works?
by monarch
in thread Can someone explain how this works?
by slloyd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |