Well, this produces .../demothumbs/..., but the OP states that he wants .../demo/thumbs/.... So a small amendment is needed:
2:29 >perl -wE "$d = 'test/home/players/demo//thumbs/super.jpg'; $d = +~ s[/{2,}][/]g; say $d;" test/home/players/demo/thumbs/super.jpg 2:34 >
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
In reply to Re^2: Need to change directory string.
by Athanasius
in thread Need to change directory string.
by huchister
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |