#  BackTick_LongFileName_Techniques.pl
#  Example 7.5:
#  ----------------------------------------
#  From "Win32 Perl Scripting: Administrators Handbook" by Dave Roth
#  Published by New Riders Publishing.
#  ISBN # 1-57870-215-1
#
#  This script illustrates the two techniques for creating
#  new processes with long file names embedded with spaces and
#  backticks.
#
print "From the book 'Win32 Perl Scripting: The Administrator's Handbook' by Dave Roth\n\n";


use Win32;
my $Name = "My Long Perl Script Name.pl";

# Fix 1: Surround the long file name with quotes...
my @Output = `"$Name"`;
print @Output;

# Fix 2: 
$Name = Win32::GetShortPathName( $Name );
@Output = `$Name`;
print @Output;    
