[Thread Prev][Thread Next][Thread Index]

Re: Strings with spaces



Ok, and here's a hint: perl's glob function/operator does NOT like
filenames with spaces. So look for 

   @list = <$SOMEDIR/*>

constructs.

I've got an Installer.pm now that replaces these with a function call
to a little routine I wrote to use opendir/readdir to build the list;
interestingly, 
  
   opendir FOO $SOMEDIR
   @list = readdir FOO;

handles the names with spaces ok. What it doesn't do that glob does is 
lose the '.' and '..' for you.

My Installer patch isn't quite ready - I'm getting segfaults on
PDA::Pilot::File::open, which means I've got to start digging
there. Also, I was lazy and added File::Basename to the "use" list; is 
this a problem for those still using perl 5.003? My perl is a debian
package, and I'm unsure what's base library vs. modules debian
includes that aren't base.

- Jim

Alan Harder writes:
 > > Has anyone else noticed that a lot of the conduits for PilotManager
 > > are not handling strings with embedded spaces well? I'm particularly
 > > seeing it in "Installer" and "Sync Memo". For example:
 > ...
 > > Before I start tackling the code, are these known problems? Has anyone 
 > > fixed them?
 > 
 > known? yes.. found time to fix? nope! :(
 > It would be great if you could look into these!  Please start with Installer.
 > If I find time I will do SyncMemo.. but if I don't get to it maybe you could
 > fix that one up too..
 > Send me the patches and I'll put out new versions..
 > 
 > thanks!!
 > 
 > 	- Alan
 > 


SourceForge.net Logo