From sneex at bellsouth.net Sat Aug 30 20:27:44 2003 From: sneex at bellsouth.net (iudicium ferat) Date: Mon Aug 2 21:30:53 2004 Subject: [Jax.PM] Wake up =) Message-ID: <20030831012744.CRAS13779.imf18aec.mail.bellsouth.net@mail.bellsouth.net> Man ... this list is way too quiet :/ Here is something small to wake you up =) What is wrong with this code? s{ }{ if ($1 || $3) ""; } }gesx; BONUS: Where did I steal it from? Cheers! -Sx- From jproctor at persons.marlboro.edu Sun Aug 31 15:04:19 2003 From: jproctor at persons.marlboro.edu (Jason Proctor) Date: Mon Aug 2 21:30:53 2004 Subject: [Jax.PM] Wake up =) In-Reply-To: <20030831012744.CRAS13779.imf18aec.mail.bellsouth.net@mail.bellsouth.net> References: <20030831012744.CRAS13779.imf18aec.mail.bellsouth.net@mail.bellsouth.net> Message-ID: > Man ... this list is way too quiet :/ WE CAN SHOUT ALL OUR POSTS IF YOU WANT... > Here is something small to wake you up =) > > What is wrong with this code? > > s{ }{ if ($1 || $3) ""; } }gesx; It's missing a "{". And given a need for {}s in the substituted string, they probably weren't the best choice for s///'s delimiters. Other than that, nothing obvious. It might not do what you want it to, but you haven't told us what that is yet. :) > BONUS: > Where did I steal it from? Did I write it? No. I hardly ever use /e, and I don't use /x as often as I ought. Dunno. j From solution at gina.net Sun Aug 31 15:44:55 2003 From: solution at gina.net (Aaron Johnson) Date: Mon Aug 2 21:30:53 2004 Subject: [Jax.PM] Wake up =) In-Reply-To: <20030831012744.CRAS13779.imf18aec.mail.bellsouth.net@mail.bellsouth.net> References: <20030831012744.CRAS13779.imf18aec.mail.bellsouth.net@mail.bellsouth.net> Message-ID: <1062362694.11013.43231.camel@development.gina.net> On Sat, 2003-08-30 at 21:27, iudicium ferat wrote: > [a jax.PM member posting] > > Man ... this list is way too quiet :/ > > Here is something small to wake you up =) > > What is wrong with this code? > > s{ }{ if ($1 || $3) ""; } }gesx; > It appears that you are attempting to remove HTML comments. One problem I see is that it isn't striping the from the HTML. > > BONUS: > Where did I steal it from? > TPJ Issue 1? > Cheers! > -Sx- > > > _______________________________________________ > Jacksonville-pm mailing list > Jacksonville-pm@mail.pm.org > http://mail.pm.org/mailman/listinfo/jacksonville-pm -- Aaron J Johnson IT Consultant/Implementor solution@gina.net (352) 687-4980 Ocala FL (321) 206-3187 Orlando FL (800) 334-0172 From sneex at bellsouth.net Sun Aug 31 19:32:40 2003 From: sneex at bellsouth.net (iudicium ferat) Date: Mon Aug 2 21:30:53 2004 Subject: [Jax.PM] Wake up =) Message-ID: <20030901003240.QUKZ13779.imf18aec.mail.bellsouth.net@mail.bellsouth.net> > What is wrong with this code? > > > > s{ }{ if ($1 || $3) ""; } }gesx; > > > > It appears that you are attempting to remove HTML comments. > One problem I see is that it isn't striping the from the HTML. Nope, when used as part of the original code, it hangs on the HTML test case... > > > > BONUS: > > Where did I steal it from? > > > > TPJ Issue 1? Great guess :) But actually this code came from Tom Christenens site at http://www.perl.com/CPAN/authors/Tom_Christiansen/scripts/ (And no, it isnt broken there - I removed a { prior to posting.) Cheers! -Sx- From sneex at bellsouth.net Sun Aug 31 19:34:29 2003 From: sneex at bellsouth.net (iudicium ferat) Date: Mon Aug 2 21:30:53 2004 Subject: [Jax.PM] Wake up =) Message-ID: <20030901003429.QVNP13779.imf18aec.mail.bellsouth.net@mail.bellsouth.net> > > Man ... this list is way too quiet :/ > > WE CAN SHOUT ALL OUR POSTS IF YOU WANT... no, however I was sleeping until you posted :) > > s{ }{ if ($1 || $3) ""; } }gesx; > > It's missing a "{". And given a need for {}s in the substituted string, > they probably weren't the best choice for s///'s delimiters. {J} winzzzzzzzzzz =) -Sx- From solution at gina.net Sun Aug 31 20:43:05 2003 From: solution at gina.net (Aaron Johnson) Date: Mon Aug 2 21:30:53 2004 Subject: [Jax.PM] Wake up =) In-Reply-To: <20030901003240.QUKZ13779.imf18aec.mail.bellsouth.net@mail.bellsouth.net> References: <20030901003240.QUKZ13779.imf18aec.mail.bellsouth.net@mail.bellsouth.net> Message-ID: <1062380585.11014.44459.camel@development.gina.net> On Sun, 2003-08-31 at 20:32, iudicium ferat wrote: > [a jax.PM member posting] > > What is wrong with this code? > > > > > > s{ }{ if ($1 || $3) ""; } }gesx; > > > > > > > It appears that you are attempting to remove HTML comments. > > One problem I see is that it isn't striping the from the HTML. > > Nope, when used as part of the original code, it hangs on the HTML test case... > Quite right, not sure what I was thinking. > > > > > > BONUS: > > > Where did I steal it from? > > > > > > > TPJ Issue 1? > > > Great guess :) But actually this code came from Tom Christenens site at > > http://www.perl.com/CPAN/authors/Tom_Christiansen/scripts/ > It does appear in TPJ issue 1 as well however. > > (And no, it isnt broken there - I removed a { prior to posting.) > > Cheers! > -Sx- > > > _______________________________________________ > Jacksonville-pm mailing list > Jacksonville-pm@mail.pm.org > http://mail.pm.org/mailman/listinfo/jacksonville-pm