should work nicely...$dir = $ARGV[0]; # get dir from arg list opendir(D, $dir) or die $!; for(readdir(D)) { $file = $_; tr/ /_/; # or tr/ \t\r\n/_/; for tabs and spaces # or s/\s+/_/g; to make multiple whitespace chars into one _ rename("$dir/$file", "$dir/$_"); } closedir(D);
In reply to Re: problem with removing space
by suaveant
in thread problem with removing space
by scarne7
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |