Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Ovid (2709)

Ovid
  (email not shown publicly)
http://publius-ovidius.livejournal.com/
AOL IM: ovidperl (Add Buddy, Send Message)

Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.

Journal of Ovid (2709)

Tuesday February 26, 2008
02:22 PM

perldoc -A @+

[ #35771 ]

I've just sent Sean Burke a patch which allows you to use perldoc to search perlvar. I hijacked the -A switch because it was free and -V defaulted to 'version'. Didn't understand the option handling code, but I didn't try too hard. It's smart enough to know how to handle 'dollar digit' variables (e.g., regex matches), and if there's more than one name for a variable, it pulls the first one:

$ perldoc -A $^I

$INPLACE_EDIT
$^I
The current value of the inplace-edit extension.  Use "undef" to disable
inplace editing.  (Mnemonic: value of -i switch.)

Heck, I don't even know what an "inplace-edit extension" is, but this patch will at least tell you the variable.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • I don't even know what an "inplace-edit extension" is...

    It's the .bak in perl -pi.bak -e 's/foo/bar/'.

    • Oh, duh! Thanks :)

      Working on this code, I saw plenty of variables I have no familiarity with. I don't know when I'd use %! or $^C, for example, though $^T looks very useful. It's a strange world, peering down there.

  • And don't forget to send that patch also into the rt.cpan.org queue, where it can rest for a long long time. ;-) Just kidding. Only to be sure it is readily available.
  • Please post your patch here too. I've been meaning to do the same for perlop for ages, so might as well copy how you've done it.