develooper Front page | perl.perl5.porters | Postings from November 1999

[ID 19991118.014] Error producing ^\ (chr 28) with "\c\\"

Thread Next
November 18, 1999 23:12
[ID 19991118.014] Error producing ^\ (chr 28) with "\c\\"
Message ID:
This is a bug report for perl from,
generated with the help of perlbug 1.26 running under perl 5.00503.

[Please enter your report here]

It appears to be impossible to produce a ^\ character (ASCII 28)
using \c notation. "\x1c" and "\034" work fine, but "\c\\" gives
a two-character string (ASCII 28, 92 i.e. ^\ followed by backslash)
and "\c\" gives "Can't find string terminator '"' anywhere before


$ perl -wle 'print join ", ", map ord, split //, "\c\"'
Can't find string terminator '"' anywhere before EOF at -e line 1.
$ perl -wle 'print join ", ", map ord, split //, "\c\\"'
28, 92

"\c\\" whould be the correct syntax in my opinion; however, it appears
that the \c logic sees two backslashes -- that the two backslashes
aren't first reduced to one (as per double-quoting usually) before \c
sees it.

[Please do not change anything below this line]

Site configuration information for perl 5.00503:

Configured by frogleg at Sun Aug  8 13:32:51 EDT 1999.

Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
    osname=linux, osvers=5.2, archname=i686-linux
    uname='linux 2.2.6-ac3 #2 thu aug 5 09:35:04 edt 1999 i686 unknown '
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef useperlio=undef d_sfio=undef
    cc='gcc', optimize='-O2', gccversion=
    cppflags='-Dbool=char -DHAS_BOOL -I/usr/local/include'
    ccflags ='-Dbool=char -DHAS_BOOL -I/usr/local/include'
    stdchar='char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt
    libc=, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:

@INC for perl 5.00503:

Environment for perl 5.00503:
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PERL_BADLANG (unset)

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About