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

[MacPerl] s/// Bug?



I recently upgraded to MacPerl 5.1.9r4 and some of my code broke. Here is
an example:

  if (s/\n%BASE\s*(.*)//gi) {
    $p{'BASE'} = $1;
  }

With 5.1.2, $1 had something in it. With 5.1.9 it's empty. I discovered
that removing the 'g' modifier fixes the problem.

My question is, is this a bug or bad coding on my part?

Thanks, RR

PS: In case anyone is interested, the 'g' made sense at the time because I
wanted to get rid of all lines starting with "%BASE" AND put the argument
from one of them into the %p hash.

__________________________________________________________________________
  Richard Rathe, MD                              rrathe@dean.med.ufl.edu
  University of Florida                      http://www.medinfo.ufl.edu/
 



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch