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

RE: file names with spaces in perl

Thread Previous | Thread Next
From:
Jenda Krynicky
Date:
February 27, 2002 09:13
Subject:
RE: file names with spaces in perl
Message ID:
3C7D2194.28205.9A8BE26@localhost
From:           	"Johnson, Shaunn" <SJohnson6@bcbsm.com>
> --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.

Jenda


=========== Jenda@Krynicky.cz == http://Jenda.Krynicky.cz ==========
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


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