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

[ID 20000320.001] bugrep0-153825

From:
Tom Dolezal
Date:
March 20, 2000 05:38
Subject:
[ID 20000320.001] bugrep0-153825
Message ID:
000001bf9271$874578a0$6b1927c3@nobody
This is a bug report for perl from dolezal@comp.cz,
generated with the help of perlbug 1.26 running under perl 5.00503.


-----------------------------------------------------------------
[Please enter your report here]

=====BEGIN=====
If I use regular expression in extended mode (with X modifier), Perl
insert all whitespaces from replacement part into result string.

Sample:
s{
	abcd
}{
	1234
}x;

Per use patter "abcd" without all whitespaces (\t or \n in sample) and
replacement "\n\t1234\n" with all whitespaces from sample.

The unsightly solution is following:
s{
	abcd
}{
	"1234"
}xe;

Result string is "1234". But, if I want using replacement on more lines,
this solution is slow (string concatenation) than classic replacement
without pattern as an expression.

Thanks, Tom.

I using Perl under Windows 98 CZ.

=====END=====
[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:"D:\Develop\Perl\lib\CORE"  -machine:x86'
    libpth="D:\Develop\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=D:\Develop\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:"D:\Develop\Perl\lib\CORE"  -machine:x86'

Locally applied patches:
    ACTIVEPERL_LOCAL_PATCHES_ENTRY

---
@INC for perl 5.00503:
    D:/Develop/Perl/lib
    D:/Develop/Perl/site/lib
    .

---
Environment for perl 5.00503:
    HOME (unset)
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\PACKER;C:\BATCH;D:\DEVELOP\PERL\BIN;D:\DEVELOP\DEVSTUDIO\VC\BIN;D:\DEVELOP\PHP;D:\APLIKACE\MTS
    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