a2p and perldb bugs
HoangVQ
vqh at drutx.ATT.COM
Tue Mar 1 05:35:44 AEST 1988
I tried mailing these to Larry Wall but they keep getting bounced back.
My copy of perl is at patch #23.
========================================================================
a2p bug #1: missing parenthesis after &&
An awk line:
print $1 > tmpfile
is translated to:
do Pick('>' . ($tmpfile)) &&
print $Fld1;
which would cause perl to fail with syntax error. Adding parentheses
around the print statement would fix it.
========================================================================
a2p bug #2: mishandling of blank lines
A blank line inserted anywhere in the following awk script will cause
a2p either to abort or generate wrong perl code.
--------------------------------------
{ if (NF > 4)
print "Yes"
else
print "No" }
--------------------------------------
========================================================================
perldb bug #1: backslashes are not accepted.
The following script is acceptable to perl but perldb aborts at the \.
--------------------------------------
$var='(abc)';
if ($var =~ /\(/ ) { print "Yes\n"; }
--------------------------------------
--
V. Hoang, AT&T Denver, ihnp4!drutx!vqh
More information about the Comp.sources.bugs
mailing list