From: Rafael Garcia-Suarez Date: Tue, 29 Jul 2003 21:20:28 +0000 (+0000) Subject: FAQ sync. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=369b44b45b100ebccc1e9e9ec79851683e716faa;p=p5sagit%2Fp5-mst-13.2.git FAQ sync. p4raw-id: //depot/perl@20330 --- diff --git a/pod/perlfaq4.pod b/pod/perlfaq4.pod index 818225b..5e10a11 100644 --- a/pod/perlfaq4.pod +++ b/pod/perlfaq4.pod @@ -1,6 +1,6 @@ =head1 NAME -perlfaq4 - Data Manipulation ($Revision: 1.43 $, $Date: 2003/02/23 20:25:09 $) +perlfaq4 - Data Manipulation ($Revision: 1.44 $, $Date: 2003/07/28 17:35:21 $) =head1 DESCRIPTION @@ -762,6 +762,19 @@ case", but that's not quite accurate. Consider the proper capitalization of the movie I, for example. +Damian Conway's L module provides some smart +case transformations: + + use Text::Autoformat; + my $x = "Dr. Strangelove or: How I Learned to Stop ". + "Worrying and Love the Bomb"; + + print $x, "\n"; + for my $style (qw( sentence title highlight )) + { + print autoformat($x, { case => $style }), "\n"; + } + =head2 How can I split a [character] delimited string except when inside [character]? Several modules can handle this sort of pasing---Text::Balanced, diff --git a/pod/perlfaq7.pod b/pod/perlfaq7.pod index 814a403..a735edc 100644 --- a/pod/perlfaq7.pod +++ b/pod/perlfaq7.pod @@ -1,6 +1,6 @@ =head1 NAME -perlfaq7 - General Perl Language Issues ($Revision: 1.14 $, $Date: 2003/01/31 17:38:14 $) +perlfaq7 - General Perl Language Issues ($Revision: 1.15 $, $Date: 2003/07/24 02:17:21 $) =head1 DESCRIPTION @@ -808,7 +808,7 @@ symbolic references, you are just using the package's symbol-table hash (like C<%main::>) instead of a user-defined hash. The solution is to use your own hash or a real reference instead. - $fred = 23; + $USER_VARS{"fred"} = 23; $varname = "fred"; $USER_VARS{$varname}++; # not $$varname++