PerlIO_fast_gets(f) = PerlIO_has_cntptr(f) && \
PerlIO_canset_cnt(f) && \
- `Can set pointer into buffer'
+ 'Can set pointer into buffer'
=item B<PerlIO_has_cntptr(f)>
Loading DB routines from perl5db.pl patch level 0.94
Emacs support available.
- Enter h or `h h' for help.
+ Enter h or 'h h' for help.
main::(-e:1): 0
DB<1> sub foo { 14 }
The debugging output at compile time looks like this:
- Compiling REx `[bc]d(ef*g)+h[ij]k$'
+ Compiling REx '[bc]d(ef*g)+h[ij]k$'
size 45 Got 364 bytes for offset annotations.
first at 1
rarest char g at 0
42: EXACT <k>(44)
44: EOL(45)
45: END(0)
- anchored `de' at 1 floating `gh' at 3..2147483647 (checking floating)
- stclass `ANYOF[bc]' minlen 7
+ anchored 'de' at 1 floating 'gh' at 3..2147483647 (checking floating)
+ stclass 'ANYOF[bc]' minlen 7
Offsets: [45]
1[4] 0[0] 0[0] 0[0] 0[0] 0[0] 0[0] 0[0] 0[0] 0[0] 0[0] 5[1]
0[0] 12[1] 0[0] 6[1] 0[0] 7[1] 0[0] 9[1] 8[1] 0[0] 10[1] 0[0]
The
- anchored `de' at 1 floating `gh' at 3..2147483647 (checking floating)
- stclass `ANYOF[bc]' minlen 7
+ anchored 'de' at 1 floating 'gh' at 3..2147483647 (checking floating)
+ stclass 'ANYOF[bc]' minlen 7
line (split into two lines above) contains optimizer
information. In the example shown, the optimizer found that the match
=back
If a substring is known to match at end-of-line only, it may be
-followed by C<$>, as in C<floating `k'$>.
+followed by C<$>, as in C<floating 'k'$>.
The optimizer-specific information is used to avoid entering (a slow) regex
engine on strings that will not definitely match. If the C<isall> flag
If the regex engine was entered, the output may look like this:
- Matching `[bc]d(ef*g)+h[ij]k$' against `abcdefg__gh__'
+ Matching '[bc]d(ef*g)+h[ij]k$' against 'abcdefg__gh__'
Setting an EVAL scope, savestack=3
2 <ab> <cdefg__gh_> | 1: ANYOF
3 <abc> <defg__gh_> | 11: EXACT <d>
Here's an example of what a stack backtrace via C<T> command might
look like:
- $ = main::infested called from file `Ambulation.pm' line 10
- @ = Ambulation::legs(1, 2, 3, 4) called from file `camel_flea' line 7
- $ = main::pests('bactrian', 4) called from file `camel_flea' line 4
+ $ = main::infested called from file 'Ambulation.pm' line 10
+ @ = Ambulation::legs(1, 2, 3, 4) called from file 'camel_flea' line 7
+ $ = main::pests('bactrian', 4) called from file 'camel_flea' line 4
The left-hand character up there indicates the context in which the
function was called, with C<$> and C<@> meaning scalar or list
breakpoint on the I<load> of some module:
DB<7> b load f:/perllib/lib/Carp.pm
- Will stop on load of `f:/perllib/lib/Carp.pm'.
+ Will stop on load of 'f:/perllib/lib/Carp.pm'.
and then restart the debugger using the C<R> command (if possible). One can use C<b
compile subname> for the same purpose.
perls, has been removed as of 5.9.3 and is no longer supported. You
should use the printf/sprintf functions instead.
-=item `%s' is not a code reference
+=item '%s' is not a code reference
(W overload) The second (fourth, sixth, ...) argument of overload::constant
needs to be a code reference. Either an anonymous subroutine, or a reference
to a subroutine.
-=item `%s' is not an overloadable type
+=item '%s' is not an overloadable type
(W overload) You tried to overload a constant type the overload package is
unaware of.
=item Possible unintended interpolation of %s in string
-(W ambiguous) You said something like `@foo' in a double-quoted string
+(W ambiguous) You said something like '@foo' in a double-quoted string
but there was no array C<@foo> in scope at the time. If you wanted a
literal @foo, then write it as \@foo; otherwise find out what happened
to the array you apparently lost track of.
C<perl -c> repeatedly, chopping away half the program each time to see
if the error went away. Sort of the cybernetic version of S<20 questions>.
-=item syntax error at line %d: `%s' unexpected
+=item syntax error at line %d: '%s' unexpected
(A) You've accidentally run your script through the Bourne shell instead
of Perl. Check the #! line, or manually feed your script into Perl
@<<< @||| @>>>
END
- print "Wow, I just stored `$^A' in the accumulator!\n";
+ print "Wow, I just stored '$^A' in the accumulator!\n";
Or to make an swrite() subroutine, which is to write() what sprintf()
is to printf(), do this:
# If you get './makedepend: 1: Syntax error: Unterminated quoted
# string' when bisecting versions of perl older than 5.9.5 this hack
# will work around the bug in makedepend.SH which was fixed in
- # version 96a8704c. Make sure to comment out `git checkout makedepend.SH'
+ # version 96a8704c. Make sure to comment out 'git checkout makedepend.SH'
# below too.
git show blead:makedepend.SH > makedepend.SH
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19xx name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type 'show w'.
This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
+ under certain conditions; type 'show c' for details.
- The hypothetical commands `show w' and `show c' should show the
+ The hypothetical commands 'show w' and 'show c' should show the
appropriate parts of the General Public License. Of course, the
- commands you use may be called something other than `show w' and `show
+ commands you use may be called something other than 'show w' and 'show
c'; they could even be mouse-clicks or menu items--whatever suits your
program.
necessary. Here a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
- program `Gnomovision' (a program to direct compilers to make passes
+ program 'Gnomovision' (a program to direct compilers to make passes
at assemblers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
close PARENT_WTR;
print CHILD_WTR "Parent Pid $$ is sending this\n";
chomp($line = <CHILD_RDR>);
- print "Parent Pid $$ just read this: `$line'\n";
+ print "Parent Pid $$ just read this: '$line'\n";
close CHILD_RDR; close CHILD_WTR;
waitpid($pid, 0);
} else {
close CHILD_RDR;
close CHILD_WTR;
chomp($line = <PARENT_RDR>);
- print "Child Pid $$ just read this: `$line'\n";
+ print "Child Pid $$ just read this: '$line'\n";
print PARENT_WTR "Child Pid $$ is sending this\n";
close PARENT_RDR;
close PARENT_WTR;
close PARENT;
print CHILD "Parent Pid $$ is sending this\n";
chomp($line = <CHILD>);
- print "Parent Pid $$ just read this: `$line'\n";
+ print "Parent Pid $$ just read this: '$line'\n";
close CHILD;
waitpid($pid, 0);
} else {
Example:
if ("ook" =~ /(o*)/) {
- # `paren' will be `1' and `value' will be `ee'
+ # 'paren' will be '1' and 'value' will be 'ee'
$1 =~ tr/o/e/;
}
One of the most important new features in Perl 5 was the capability to
manage complicated data structures like multidimensional arrays and
nested hashes. To enable these, Perl 5 introduced a feature called
-`references', and using references is the key to managing complicated,
+'references', and using references is the key to managing complicated,
structured data in Perl. Unfortunately, there's a lot of funny syntax
to learn, and the main manual page can be hard to follow. The manual
is quite complete, and sometimes people find that a problem, because
to push C<Athens> onto an array that doesn't exist, so it helpfully
makes a new, empty, anonymous array for you, installs it into
C<%table>, and then pushes C<Athens> onto it. This is called
-`autovivification'--bringing things to life automatically. Perl saw
+'autovivification'--bringing things to life automatically. Perl saw
that they key wasn't in the hash, so it created a new hash entry
automatically. Perl saw that you wanted to use the hash value as an
array, so it created a new empty array and installed a reference to it
termcap color sequences. Here is example output:
% perl -e 'use re "debug"; "abc" =~ /a*b+c/;'
- Compiling REx `a*b+c'
+ Compiling REx 'a*b+c'
size 9 first at 1
1: STAR(4)
2: EXACT <a>(0)
5: EXACT <b>(0)
7: EXACT <c>(9)
9: END(0)
- floating `bc' at 0..2147483647 (checking floating) minlen 2
- Guessing start of match, REx `a*b+c' against `abc'...
- Found floating substr `bc' at offset 1...
+ floating 'bc' at 0..2147483647 (checking floating) minlen 2
+ Guessing start of match, REx 'a*b+c' against 'abc'...
+ Found floating substr 'bc' at offset 1...
Guessed: match at offset 0
- Matching REx `a*b+c' against `abc'
+ Matching REx 'a*b+c' against 'abc'
Setting an EVAL scope, savestack=3
0 <> <abc> | 1: STAR
EXACT <a> can match 1 times out of 32767...
2 <ab> <c> | 7: EXACT <c>
3 <abc> <> | 9: END
Match successful!
- Freeing REx: `a*b+c'
+ Freeing REx: 'a*b+c'
If you have gotten this far into the tutorial, you can probably guess
what the different parts of the debugging output tell you. The first
part
- Compiling REx `a*b+c'
+ Compiling REx 'a*b+c'
size 9 first at 1
1: STAR(4)
2: EXACT <a>(0)
i.e., C<PLUS(7)>. The middle lines describe some heuristics and
optimizations performed before a match:
- floating `bc' at 0..2147483647 (checking floating) minlen 2
- Guessing start of match, REx `a*b+c' against `abc'...
- Found floating substr `bc' at offset 1...
+ floating 'bc' at 0..2147483647 (checking floating) minlen 2
+ Guessing start of match, REx 'a*b+c' against 'abc'...
+ Found floating substr 'bc' at offset 1...
Guessed: match at offset 0
Then the match is executed and the remaining lines describe the
process:
- Matching REx `a*b+c' against `abc'
+ Matching REx 'a*b+c' against 'abc'
Setting an EVAL scope, savestack=3
0 <> <abc> | 1: STAR
EXACT <a> can match 1 times out of 32767...
2 <ab> <c> | 7: EXACT <c>
3 <abc> <> | 9: END
Match successful!
- Freeing REx: `a*b+c'
+ Freeing REx: 'a*b+c'
Each step is of the form S<C<< n <x> <y> >>>, with C<< <x> >> the
part of the string matched and C<< <y> >> the part not yet