Richard Thomas wrote: > Hi, > > I use the "use File::Glob ':glob'" method for windows paths with spaces in. > The variable that I pass into this function is read in from a configuration > file and can be "C:\Program Files" (directory name) and can also be > "logs\app.log" (specific filename). > > When I specify a directory with spaces in, "use File::Glob ':glob'" works, > but when I specify a specific filename with no spaces in, I get error "Out > of memory!" > > So at the moment, I have to use "use File::Glob ':glob'" for directories > with spaces in and I have to comment out "use File::Glob ':glob'" to get > round the "Out of memory!" error when I specify a specific filename with no > spaces in. > > What I need is my script to not need altering between these two types of > file specification. > > Please do you know of any what that I can do this.
Don't use file globbing. That would be my choice. Use opendir/readdir/closedir and do your own RE to pick the files you want - much more dependable and portable. -- ,-/- __ _ _ $Bill Luebkert Mailto:[EMAIL PROTECTED] (_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.com/ -/-' /___/_<_</_</_ http://dbecoll.tripod.com/ (Free site for Perl/Lakers) _______________________________________________ ActivePerl mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
