Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!ucsd!ucbvax!NISC.SRI.COM!cwilson From: cwilson@NISC.SRI.COM (Chan Wilson [Animal]) Newsgroups: comp.lang.perl Subject: an easier way? Message-ID: <23043@fs2.NISC.SRI.COM> Date: 3 Nov 90 02:13:27 GMT Distribution: comp Organization: Network Info Systems Ctr., SRI Intl., Menlo Park, CA. Lines: 16 I've got a script that distills mailserver stats down to a simple access count. I've got the following snippet of code: $file{(reverse(split(/\//,$path)))[0]}++ if ($part =~ /A1\//); where $path is "/home/fs3/mserv/HELP" or somesuch. I'm curious - is there a better way to do this? I tried a number of regexps, but couldn't come up with one, so had fun creating the above one liner. :) --Chan Chan Wilson Chief Hard-Question Answer Person SRI Intl. Network Information Systems Center 333 Ravenswood Ave., EJ287 Internet: cwilson@nisc.sri.com Menlo Park, CA., 94025 Phone: (415)859-4492 "If I want to be a surfer this month, I bloody well will be."