#  Piping_LongFileName_With_Spaces.pl
#  Example 7.8:
#  ----------------------------------------
#  From "Win32 Perl Scripting: Administrators Handbook" by Dave Roth
#  Published by New Riders Publishing.
#  ISBN # 1-57870-215-1
#
#  This script illustrates redirecting STDERR into STDOUT using
#  a piped open.
#
print "From the book 'Win32 Perl Scripting: The Administrator's Handbook' by Dave Roth\n\n";


my $Name = "MyScript.pl";
if( open( FILE, "$Name 2>&1 |" ) )
{
    while( my $Line = <FILE> )
    {
        print $Line;
    }
    close( FILE );
}       
