My Bad. It looks like I had some code in the wrong place. Will
try again.
Skip
m...@elysianfieldssoftware.com wrote:
Skip,
That *should* work. The below works on my Linux box.
$img_dir=This is an dir name with spaces;
$img_dir =~ s/ /_/g;
printf(%s\n,$img_dir);
mkdir($img_dir,$CHMOD_ON_FOLDER_CREATE);
Is there something else you're not posting, or maybe I'm not understanding?
Always glad to help a fellow cheesehead.
Regards,
Matt Flaig
Elysian Fields Software, L.L.C.
Original Message
Subject: [SPAM] [PHP] Little perl help?
From: Skip Evans s...@bigskypenguin.com
Date: Wed, September 09, 2009 3:35 pm
To: php-general@lists.php.net php-general@lists.php.net
Hey all,
I know this is a PHP list, but I could use a bit of Perl help,
a language which just does not fit in my C/C++/Java/PHP
trained brain.
A directory is created with the following:
mkdir($img_dir,$CHMOD_ON_FOLDER_CREATE);
I need to replace spaces with the underscore character so the
directory name contains no spaces, so I tried preceding it with
$img_dir =~ s/ /_/g;
Which did nothing.
Can someone help here?
Much thanks,
Skip
--
Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com
Those of you who believe in
telekinesis, raise my hand.
-- Kurt Vonnegut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
Skip Evans
Big Sky Penguin, LLC
503 S Baldwin St, #1
Madison WI 53703
608.250.2720
http://bigskypenguin.com
Those of you who believe in
telekinesis, raise my hand.
-- Kurt Vonnegut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php