in reply to Compiling and Installing Perl

Because, of all the things you can do with the -D switch, debugging REs is the most commonly wanted when not debugging perl itself, you can do:
$ perl -we'use re "debug"; qr/[\s*\W*]/' Compiling REx `[\s*\W*]' size 13 Got 108 bytes for offset annotations. first at 1 1: ANYOF[\0-/:-@[-\^`{-\377+utf8::IsSpacePerl !utf8::IsWord](13) 13: END(0) stclass `ANYOF[\0-/:-@[-\^`{-\377+utf8::IsSpacePerl !utf8::IsWord]' mi +nlen 1 Offsets: [13] 1[8] 0[0] 0[0] 0[0] 0[0] 0[0] 0[0] 0[0] 0[0] 0[0] 0[0] 0[0] 9[ +0] Freeing REx: `"[\\s*\\W*]"'
even on a non-debugging perl.

Replies are listed 'Best First'.
Re: Re: Compiling and Installing Perl
by Anonymous Monk on Dec 05, 2003 at 08:06 UTC
    Except nobody will reccomend you write code like that :)
    perl -Mre=debug -we'qr/[\s*\W*]/'
    perldoc perlrun
      In my experience, the -M switch isn't as widely understood as "use" :). I've gotten comments a number of times indicating that peoples eyes glaze over when they see a switch they don't know, even where it should be pretty obvious what it does.

      That said, here's a cool way to check a module's version number: perl -MName::Of::Module=99999999

      Thanks to everyone for their answers. If I can get the time (and the nerve) I will try installing Perl 5.8.1. In the the meantime I will use the command line code from AnonyMonk and study the code ysth sent.

      Thanks to all,

      xenchu


      ****sigfilesigfilesigfilesigfilesigfilesigfilesigfilesigfile

      Perl has one Great Advantage and one Great Disadvantage:

      It is very easy to write a complex and powerful program in three lines of code.

      ********************************************

      The Needs of the World and my Talents run parallel to infinity.