[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
[ID 20000127.001] redo doesn't like lexical vars defined in while test
This is a bug report for perl from lektu@teleline.es,
generated with the help of perlbug 1.26 running under perl 5.00503.
-----------------------------------------------------------------
[Please enter your report here]
--- begin sample script ---
while (my $line = <DATA>) {
if ($line =~ /Two/) {
$line = "Dos\n";
redo;
}
print $line;
}
__DATA__
One
Two
Three
--- end sample script ---
outputs:
One
Three
or, with -w:
One
Use of uninitialized value at test_redo.pl line 2, <DATA> chunk 2.
Use of uninitialized value at test_redo.pl line 6, <DATA> chunk 2.
Three
Using:
2c2,3
< while (my $line = <DATA>) {
---
> my $line;
> while ($line = <DATA>) {
the output is:
One
Two
Three
as expected.
Perhaps that's the intended effect, but I didn't find any
reference to it in the docs.
[Please do not change anything below this line]
-----------------------------------------------------------------
---
Site configuration information for perl 5.00503:
Summary of my perl5 (5.0 patchlevel 5 subversion 03) configuration:
Platform:
osname=MSWin32, osvers=4.0, archname=MSWin32-x86-object
uname=''
hint=recommended, useposix=true, d_sigaction=undef
usethreads=undef useperlio=undef d_sfio=undef
Compiler:
cc='cl.exe', optimize='-Od -MD -DNDEBUG -TP -GX', gccversion=
cppflags='-DWIN32'
ccflags ='-Od -MD -DNDEBUG -TP -GX -DWIN32 -D_CONSOLE -DNO_STRICT
-DHAVE_DES_FCRYPT -DPERL_OBJECT'
stdchar='char', d_stdstdio=define, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10
alignbytes=8, usemymalloc=n, prototype=define
Linker and Libraries:
ld='link', ldflags ='-nologo -nodefaultlib -release
-libpath:"C:\Perl\lib\CORE" -machine:x86'
libpth="C:\Perl\lib\CORE" "D:\Program Files\Microsoft Visual
Studio\VC98\mfc\lib" "D:\Program Files\Microsoft Visual
Studio\VC98\lib"
libs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib
netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib version.lib
odbc32.lib odbccp32.lib PerlCRT.lib
libc=C:\Perl\lib\CORE\PerlCRT.lib, so=dll, useshrplib=yes,
libperl=perlcore.lib
Dynamic Linking:
dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -release
-libpath:"C:\Perl\lib\CORE" -machine:x86'
Locally applied patches:
ACTIVEPERL_LOCAL_PATCHES_ENTRY
---
@INC for perl 5.00503:
C:/Perl/lib
C:/Perl/site/lib
.
---
Environment for perl 5.00503:
HOME=D:\usr\home
LANG (unset)
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=C:\Perl\bin;c:\orant\bin;C:\WINNT\SYSTEM32;C:\WINNT;D:\bin\tool;d:\bin\cygwin-b20\H-i586-cygwin32\bin;C:\Program
Files\Mts;D:\bin\PGPNT;D:\Program Files\Microsoft Visual
Studio\Common\Tools\WinNT;D:\Program Files\Microsoft Visual
Studio\Common\MSDev98\Bin;D:\Program Files\Microsoft Visual
Studio\Common\Tools;D:\Program Files\Microsoft Visual
Studio\VC98\bin;D:\BIN\EMACS\BIN;C:\4NT;D:\BIN\GNAT\BIN;d:\bin\expat;d:\bin\jade;D:\PROGRA~1\BORLAND\DELPHI4\BIN;D:\PROGRA~1\BORLAND\VBROKER\BIN;D:\PROGRA~1\BORLAND\VBROKER\JRE\BIN;D:\bin\xml4c2_0_0\bin;D:\verity\cdpub30\_nti31\bin;C:\mysql\bin;
PERL_BADLANG (unset)
SHELL (unset)
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]