in reply to spaces in filenames
It seems as though your problem has (hopefully) been solved, so I'll just throw in my two cents. For those for() loops, you should be using $#title and $#files where you currently have scalar(@title) and scalar(@files). '$#' will return the last index of the array, rather than the number of elements contained within the array. As well, your for() loops use the well-known version, coming from many other languages other than Perl. If you are planning on programming Perl more often than not and you want things to look cleaner, you might want to take a look at Perl's neat and clean-cut version of the for() loop. The two loops within your code could be modified to look like the following:
for my $i (0 .. $#title) { ... } for my $a (0 .. $#file) { ... }
Makes it simple to read, takes less typing, and has an overall positive effect. As well, tacking on 'use strict' right beneath the shebang line will do wonders for you. It would be worth the time to add it on and get the script working with strict enabled. :)
C:\>shutdown -s
>> Could not shut down computer:
>> Microsoft is logged in remotely.
|
|---|