develooper Front page | perl.perl5.porters | Postings from September 2000

[ID 20000919.001] use strict doesn't catch bareword regex

From:
Curtis Poe
Date:
September 19, 2000 14:41
Subject:
[ID 20000919.001] use strict doesn't catch bareword regex
Message ID:
Pine.LNX.4.10.10009191344560.6838-100000@www.maserith.com
The following code does not generate an error:

#!C:/bin/perl -w
use strict;

my $test = 'aba';
print "Good\n" if $test =~ ab;

Since "ab" on the last line is a bareword, this should generate
an error when using strict.  It does not.  Despite having 5.005_03
on my system, I am assured by others that this problem also occurs
in 5.6 on Mandrake Linux and ActiveState WinNT.

Cheers,
Curtis Poe

"If I heard a voice from heaven say 'live without loving',
I'd beg off.  Girls are such exquisite hell."  -- Ovid


---
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"
    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=' ',
ddlflags='-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 (unset)
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=C:\PERL\BIN;C:\PERL\LIB;C:\WINDOWS;C:\WINDOWS\COMMAND;\BIN;;
    PERL_BADLANG (unset)
    SHELL (unset)






nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About