develooper Front page | perl.beginners | Postings from November 2003

Re: Glob and space in directory name

Thread Previous | Thread Next
From:
John W. Krahn
Date:
November 26, 2003 22:54
Subject:
Re: Glob and space in directory name
Message ID:
3FC59F8E.6F46A2A9@acm.org
Boris Shor wrote:
> 
> Why does the following work (eg, give me an array filled with matching file
> names):
> 
> @filelist = glob("w:/stleg/Colorado/House_98/*.htm");
> 
> And when I rename the directory to "House 98" (space instead of underscore),
> the following does not:
> 
> @filelist = glob("w:/stleg/Colorado/House 98/*.htm");


This works in Linux, don't know if it will work in Windows.

use File::Glob ':glob';

my @filelist = glob 'w:/stleg/Colorado/House 98/*.htm';



John
-- 
use Perl;
program
fulfillment

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About