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


in reply to Extract info from a list

Actually you don't even need a regex for this:

$s{substr($_, 2,index($_,'/',2)-2)}++ for <DATA>; print reverse sort map {"$_ = $s{$_}\n"} keys %s; __DATA__ //word.one.team/other.stuff/Info.info //this.sentence/other.inforation/moreInfo //first.part.here/set.list //this.sentence/data/processing