summaryrefslogtreecommitdiff
path: root/x2p
diff options
context:
space:
mode:
authorZefram <zefram@fysh.org>2009-10-23 00:27:42 +0100
committerH.Merijn Brand <h.m.brand@xs4all.nl>2009-10-23 07:47:00 +0200
commitdbe039e5024b852fa5e0d588f1922a4d1b5d8c64 (patch)
tree3c3a54832cae2f89a36c22f03ce270c5dd7ec22d /x2p
parent19720b39a307f3ff449747dea71012038b7a8714 (diff)
downloadperl-dbe039e5024b852fa5e0d588f1922a4d1b5d8c64.tar.gz
a2p generates code using $[
I missed earlier that the a2p documentation mentions $[. Patch attached. The same doc section has a couple of other paragraphs that look like they need updating, but I'm not sure what to do with them: one refers to keys() not applying to arrays, and one is about $#. -zefram Signed-off-by: H.Merijn Brand <h.m.brand@xs4all.nl>
Diffstat (limited to 'x2p')
-rw-r--r--x2p/a2p.pod8
1 files changed, 4 insertions, 4 deletions
diff --git a/x2p/a2p.pod b/x2p/a2p.pod
index 4b66771b36..d32a9c7efa 100644
--- a/x2p/a2p.pod
+++ b/x2p/a2p.pod
@@ -122,9 +122,9 @@ implicit in the awk script. There are times when you can move this
down past some conditionals that test the entire record so that the
split is not done as often.
-For aesthetic reasons you may wish to change the array base $[ from 1
-back to perl's default of 0, but remember to change all array
-subscripts AND all substr() and index() operations to match.
+For aesthetic reasons you may wish to change index variables from being
+1-based (awk style) to 0-based (Perl style). Be sure to change all
+operations the variable is involved in to match.
Cute comments that say "# Here is a workaround because awk is dumb"
are passed through unmodified.
@@ -148,7 +148,7 @@ statement that is the last statement executed in a subroutine. A2p
catches the most common case, but doesn't analyze embedded blocks for
subtler cases.
-ARGV[0] translates to $ARGV0, but ARGV[n] translates to $ARGV[$n]. A
+ARGV[0] translates to $ARGV0, but ARGV[n] translates to $ARGV[$n-1]. A
loop that tries to iterate over ARGV[0] won't find it.
=head1 ENVIRONMENT