http://www.perlmonks.org?node_id=1011302

huchister has asked for the wisdom of the Perl Monks concerning the following question:

I would like to change directory string. Here is the example URL.
my $dir_str = "test/home/players/demo//thumbs/super.jpg";
I am trying to remove 'demo//thumbs' part to 'demo/thumbs' Is there easier way to put this? I am trying to use s/ method.