Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] GREP basics




> 
> From: Tapio Peltonen <tappel@example.com>
> Date: 2003/01/30 Thu AM 10:58:20 EST
> >perl -ne '$m += split /<hdwd>/; --$m; END {print "$m\n"}' *
> 
> Hm, my perl is a bit rusty, does this count the occurrances if they
> start within the previous occurrance? So that if you want to count the
> occurrances of the string "aba" in the string "ababa" so it would answer
> two?
>

No it would be one, which is quite logical IMHO.

Viktor




Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links