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

Re: [MacPerl] 3 Questions and a Possible



"Joseph Cozad-RZXD50" <Joseph_Cozad-RZXD50@email.sps.mot.com> writes:
>3 Questions and a Possible Bug
>I'm using MacPerl 5.1.0r2. I have three problems:
>
>1. I have the following line of code in my script:
>        $string =~ s/[^a-zA-Z_0-9\s]/unpack('c', $1)/eg;
>   When I run it I get a bomb and have to restart my computer. Why?

I can tell you why it doesn't work: You need either parentheses around the []
to make $1 work or replace $1 with $&.

Why it bombs is a separate issue that bears investigation.

>3. Finally, I'm still having a problem with "requiring" my personal 
>libraries. I still get a message of your library not found in @INC when I 
>run a runtime compiled MacPerl script; alternatively if I run the same 
>script as a non-runtime everything is ok. What gives?

Something to do with preference files. Runtimes use their own preference files
in preference (sorry :-) to the default MacPerl preference files. I don't
remember the exact algorithm, though.

Matthias

-----
Matthias Neeracher   <neeri@iis.ee.ethz.ch>   http://www.iis.ee.ethz.ch/~neeri
  "And that's why I am going to turn this world upside down, and make
   of it a fire so *bright* that someone real will notice"
                                -- Vernor Vinge, _Tatja Grimm's World_