Mailing List Archive

Support open source code!


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

Re: REGEXP in perl questiion



On Wed, May 23, 2001 at 11:28:52AM +0100, Simon Cozens wrote:
> On Wed, May 23, 2001 at 07:09:21PM +0900, Matt Doughty wrote:
> > why not:
> >  perl -ne '/^Subject: Cron <.*?> (\S+)/ && print (split(/\//,$1))[-1] . "\n"' < file
> 
> Because it's a syntax error.
fair enough.... how bout.....
perl -ne '/^Subject: Cron <.*?> (\S+)/ && print "".(split(/\//,$1))[-1]."\n"' < file
Now I guess it is time to leave the dead horse alone...
> 
> -- 
> "Consider a spherical bear, in simple harmonic motion..."
> 		-- Professor in the UCB physics department
> 
> -----------------------------------------------------------------------
> Next Technical Meeting:  Sat, May 12 13:30- 
> Next Nomikai Meeting:    Fri, June (TBA) 19:30- Tengu Tokyo Eki Mae
> -----------------------------------------------------------------------
> more info: http://www.tlug.gr.jp           Sponsor: Global Online Japan


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links