severity 393066 normal
close 393066
thanks

On Sat, Oct 14, 2006 at 09:01:32PM +0200, Bernd Warken wrote:
>The `print' command in `awk' adds automatically a `\n' at the end.  `a2p'
>translates it just in a Perl `print' without adding a `\n'.

awk print output is followed by the value of ORS (newline by default). 
perl print output is followed by the value of $\ , which a2p sets
initially to "\n".

  $ awk -F: '$3 == 0 { print $1 }' /etc/passwd                 
  root
  $ echo '$3 == 0 { print $1 }' | a2p -F: | perl - /etc/passwd 
  root

The trivial example above works fine and a trailing newline is produced
in both cases.

a2p is not intended to produce a perfect machine-translation of awk code
to perl (please see the manual page under "Considerations").  You may
need to modify the output.

>Severity: grave
>Justification: renders package unusable

While a2p may not be behaving as you expect, this does not render the
perl package unusable.

--bod


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to