in reply to Re: How to remove the spaces after the directory name and before the .html extension from my code using perl?
in thread How to remove the spaces after the directory name and before the .html extension from my code using perl?

$word=~s/("\S+|\S+|")\s*/$1/g;
I had used the above thing to remove the spaces .
  • Comment on Re^2: How to remove the spaces after the directory name and before the .html extension from my code using perl?
  • Download Code

Replies are listed 'Best First'.
Re^3: How to remove the spaces after the directory name and before the .html extension from my code using perl?
by Corion (Patriarch) on Apr 13, 2017 at 10:41 UTC

    And did that remove all spaces from $word?

    How did you verify that that removed all spaces from $word?

    I suggest that, as an exercise, you write a short program that removes all whitespace from a list of "interesting" words in an array. This will teach you how to investigate and verify your assumptions about your data and your program.