Perl: the Markov chain saw | |
PerlMonks |
Stripping parts of paths from directory namesby r.joseph (Hermit) |
on Jan 06, 2001 at 13:19 UTC ( [id://50234]=perlquestion: print w/replies, xml ) | Need Help?? |
r.joseph has asked for the wisdom of the Perl Monks concerning the following question:
I am just full of questions lately!! Here is another one! From my directory search, I have entries such as this one: /home/sites/site18/users/rjoseph/web/images/image1.jpg The users web directory starts from the web sub-dir, and so I want to strip off everything above that, ie: /home/sites/site18/users/rjoseph/ But, I want to have the above path stored in a varible, so I can change it on the fly to adapt to different directores. I tried doing this: But that didn't work. How would I do this correctly? Thanks you so much! R.Joseph
Back to
Seekers of Perl Wisdom
|
|