Hi
I am using a simple perl script that would list the names of the files in a specified directory (using glob command). But when i pass a path that has a space in a folder, the code fails! How do i escape the blank spaces in folder names>
Code shown below:
$input_folder = $ARGV[0];
print "input : $input_folder \n";
@inp_files = glob("$input_folder" . "\\*.*");
foreach $inp(@inp_files)
{
print "$inp" . "\n";
@filename = split(/\\/, "$inp");
$levels = scalar @filename;
my $name = $filename[$levels - 1];
print "\t\t\t File Name : $name \n";
}