Skip to content
Browse files

remove prototypes from examples

  • Loading branch information...
1 parent 4753c4e commit 36d2e0cd26204807218f85c929cc6c57ca9591fd @mauke mauke committed
Showing with 3 additions and 3 deletions.
  1. +2 −2 lib/perlfaq6.pod
  2. +1 −1 lib/perlfaq7.pod
View
4 lib/perlfaq6.pod
@@ -231,7 +231,7 @@ properties of bitwise xor on ASCII strings.
And here it is as a subroutine, modeled after the above:
- sub preserve_case($$) {
+ sub preserve_case {
my ($old, $new) = @_;
my $mask = uc $old ^ $old;
@@ -271,7 +271,7 @@ the case of the last character is used for the rest of the substitution.
# Original by Nathan Torkington, massaged by Jeffrey Friedl
#
- sub preserve_case($$)
+ sub preserve_case
{
my ($old, $new) = @_;
my $state = 0; # 0 = no change; 1 = lc; 2 = uc
View
2 lib/perlfaq7.pod
@@ -414,7 +414,7 @@ Here's an example of how to pass in a string and a regular expression
for it to match against. You construct the pattern with the C<qr//>
operator:
- sub compare($$) {
+ sub compare {
my ($val1, $regex) = @_;
my $retval = $val1 =~ /$regex/;
return $retval;

0 comments on commit 36d2e0c

Please sign in to comment.
Something went wrong with that request. Please try again.