X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=x2p%2Fa2p.pod;h=fa726fb101c7aa625050f8847cc0dfd4d188096d;hb=0146554f605695de389f3b8c36a7b3b994325cb4;hp=3976abab67e6bba0520ec0e7354edb83f67d0e4a;hpb=53282e287735a6e6bbd7d90f4eb790c61d232d6e;p=p5sagit%2Fp5-mst-13.2.git diff --git a/x2p/a2p.pod b/x2p/a2p.pod index 3976aba..fa726fb 100644 --- a/x2p/a2p.pod +++ b/x2p/a2p.pod @@ -41,6 +41,12 @@ Any delimiter can be used to separate the field names. causes a2p to assume that input will always have that many fields. +=item B<-o> + +tells a2p to use old awk behavior. For now, the only difference is +that old awk always has a line loop, even if there are no line +actions, whereas new awk does not. + =back =head2 "Considerations" @@ -82,13 +88,13 @@ block to bypass the block under such circumstances can be simplified by removing the conditional in the END block and just exiting directly from the perl script. -Perl has two kinds of array, numerically-indexed and associative. Awk -arrays are usually translated to associative arrays, but if you happen -to know that the index is always going to be numeric you could change -the {...} to [...]. Iteration over an associative array is done using -the keys() function, but iteration over a numeric array is NOT. You -might need to modify any loop that is iterating over the array in -question. +Perl has two kinds of array, numerically-indexed and associative. +Perl associative arrays are called "hashes". Awk arrays are usually +translated to hashes, but if you happen to know that the index is +always going to be numeric you could change the {...} to [...]. +Iteration over a hash is done using the keys() function, but iteration +over an array is NOT. You might need to modify any loop that iterates +over such an array. Awk starts by assuming OFMT has the value %.6g. Perl starts by assuming its equivalent, $#, to have the value %.20g. You'll want to @@ -134,7 +140,7 @@ A2p uses no environment variables. =head1 AUTHOR -Larry Wall EFE +Larry Wall EFE =head1 FILES