use warnings; use strict; my $dir_str = "test/home/players/demo//thumbs/super.jpg"; $dir_str =~ s{//+}{/}g; print "$dir_str\n"; __END__ test/home/players/demo/thumbs/super.jpg
UPDATE: fixed typo. Thanks Athanasius
In reply to Re: Need to change directory string.
by toolic
in thread Need to change directory string.
by huchister
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |