develooper Front page | perl.beginners | Postings from February 2002

RE: file names with spaces in perl

Thread Previous | Thread Next
Jenda Krynicky
February 27, 2002 09:13
RE: file names with spaces in perl
Message ID:
From:           	"Johnson, Shaunn" <>
> --Yeah, I did cut and past, but I missed
> the backticks at the beginning and
> end of the command (mkisofs) and
> the end of the line.

No problem, just wanted to be sure.

> --The readdir option - not sure if I follow,
> but I will look for something about readdir
> instead of `ls -1` for what I have to.

Oooops ... now I think I do know what the problem is. Could you try 
to chomp($cmd) ? If you assign the backticks to an array, then all 
the items of that array end with a newline.

That's why I don't fully believe that the output looked right if you 
printed instead off executed the commands.

And that's also one of the reasons why I think

	for $cmd (glob "$report_dir/*") {

would be better.


=========== == ==========
There is a reason for living. There must be. I've seen it somewhere.
It's just that in the mess on my table ... and in my brain.
I can't find it.
					--- me

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About