XP is just a number | |
PerlMonks |
Re: modify a URLby mjscott2702 (Pilgrim) |
on Nov 05, 2010 at 09:18 UTC ( [id://869640]=note: print w/replies, xml ) | Need Help?? |
If you want to do it with just a regex, could try something like:
perl -e '$url = "http://www.abc.com/def/ghi.html"; $url =~ s/(\w)\/.*$/\1/; print $url;'
In Section
Seekers of Perl Wisdom
|
|