Re: [perl] glob() and filenames w/ spaces

2001-04-26 Thread Sven Burgener
On Tue, Apr 24, 2001 at 07:33:49PM -0500, will trillich wrote: > or, maybe try > > use File::Find; > my @list = (); > find( \&iterator , "./path/one" , "/another/path/here"); > &munge( @list ); > > sub iterator { > push @list,$File::Find::name >

Re: [perl] glob() and filenames w/ spaces

2001-04-25 Thread will trillich
On Tue, Apr 24, 2001 at 08:43:00PM -0500, Andrew Perrin wrote: > > perl -e 'opendir DIR,".";print join ":",grep/.*/,readdir DIR' > > What's the point of the grep() there? grep /.*/ by definition returns all > elements (since . is 'any character' and * is 'zero or more of them'). you're rig

Re: [perl] glob() and filenames w/ spaces

2001-04-24 Thread John R Lenton
On Wed, Apr 25, 2001 at 01:37:39AM +0200, Sven Burgener wrote: > How do I deal with the situation where glob("*") is used and where there > are files that contain spaces in their file names? what "situation"? $ touch a\ b c\ d $ ls -l total 0 -rw-rw-r--1 john john

Re: [perl] glob() and filenames w/ spaces

2001-04-24 Thread Erdmut Pfeifer
On Wed, Apr 25, 2001 at 01:37:39AM +0200, Sven Burgener wrote: > Hi all > > Sorry if this is too off-topic, but on debian-user there is usually > excellent help, so I cannot resist. =) > > How do I deal with the situation where glob("*") is used and where there > are files that contain spaces in

Re: [perl] glob() and filenames w/ spaces

2001-04-24 Thread Juan Fuentes
On Wed, Apr 25, 2001 at 01:37:39AM +0200, Sven Burgener wrote: > Hi all > > Sorry if this is too off-topic, but on debian-user there is usually > excellent help, so I cannot resist. =) > > How do I deal with the situation where glob("*") is used and where there > are files that contain spaces in

Re: [perl] glob() and filenames w/ spaces

2001-04-24 Thread Andrew Perrin
> perl -e 'opendir DIR,".";print join ":",grep/.*/,readdir DIR' What's the point of the grep() there? grep /.*/ by definition returns all elements (since . is 'any character' and * is 'zero or more of them'). -- Andrew J P

Re: [perl] glob() and filenames w/ spaces

2001-04-24 Thread will trillich
On Wed, Apr 25, 2001 at 01:37:39AM +0200, Sven Burgener wrote: > Hi all > > Sorry if this is too off-topic, but on debian-user there is usually > excellent help, so I cannot resist. =) > > How do I deal with the situation where glob("*") is used and where there > are files that contain spaces in

[perl] glob() and filenames w/ spaces

2001-04-24 Thread Sven Burgener
Hi all Sorry if this is too off-topic, but on debian-user there is usually excellent help, so I cannot resist. =) How do I deal with the situation where glob("*") is used and where there are files that contain spaces in their file names? I know spaces in file names suck. I have no choice. It's t