"Steven Kurylo" writes:
> On 2/9/07, Greg Oster <oster@cs.usask.ca> wrote:
> > Scott Walde writes:
> > > some of my uncommented historical perl code comes back to haunt me:
> > >
> > > $titles[$x]=~s/^.*\/([^\/]+)\.\w+$\..*/$1/;
> >
> > take: blah/foo/bar/baz.something
> > and convert it to: baz
> >
> > Do I get a cookie?
>
> I was in the middle of typing the exact same thing, and wondering if
> I'd get a cookie too...
>
> But why does he have the "$\..*". Catch trailing garbage for fun?
Ya... my eyes stopped parsing at $, and had sent off my reply before
realizing "there was more!"...
Later...
Greg Oster
Received on Fri Feb 9 14:45:59 2007
This archive was generated by hypermail 2.1.8 : Fri Feb 09 2007 - 14:46:07 CST