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

[ID 20000324.059] stumbled on a bug?

From:
Cere Davis
Date:
March 24, 2000 15:38
Subject:
[ID 20000324.059] stumbled on a bug?
Message ID:
200003242338.PAA31333@salome2.mcis.washington.edu

This is a bug report for perl from cere@salome2.mcis.washington.edu,
generated with the help of perlbug 1.26 running under perl 5.00503.


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

I don't know if this is a bug or....

but I've got this really crude piece of Perl code that simply converts
a Month string into a month number.  It looks like so:

  $month="Sep";
  if($month eq "Mar"){$month=03;} if($month eq "Jan"){$month=01;}
  if($month eq "Feb"){$month=02;} if($month eq "Apr"){$month=04;}
  if($month eq "May"){$month=05;} if($month eq "Jun"){$month=06;}
  if($month eq "Nov"){$month=11;} if($month eq "Dec"){$month=12;}
  if($month eq "Jul"){$month=07;} if($month eq "Aug"){$month="08";}
  if($month eq "Sep"){$month="09";} if($month eq "Oct"){$month=10;}
  print " $month\n";

if I take the quotes out of the 09 or 08 months I get a compile time
error that says:

Illegal octal digit at ./mscape_parse.pl line 13, at end of line
Execution of ./mscape_parse.pl aborted due to compilation errors.

(Ignore the line numbers in the error.)  I know that the errors are easy coming from the unquoted 08 and 09 months.

What's up with this weirdness?




[Please do not change anything below this line]
-----------------------------------------------------------------

---
Site configuration information for perl 5.00503:

Configured by cere at Mon Sep 20 14:17:11 PDT 1999.

Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
  Platform:
    osname=dec_osf, osvers=4.0, archname=alpha-dec_osf
    uname='osf1 salome2.mcis.washington.edu v4.0 878 alpha '
    hint=previous, useposix=true, d_sigaction=define
    usethreads=undef useperlio=undef d_sfio=undef
  Compiler:
    cc='cc', optimize='-O4', gccversion=
    cppflags='-std -ieee -D_INTRINSICS -I/usr/local/include -DLANGUAGE_C'
    ccflags ='-std -fprm d -ieee -D_INTRINSICS -I/usr/local/include -DLANGUAGE_C'
    stdchar='unsigned char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=8, ptrsize=8, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
    alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries:
    ld='ld', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /var/shlib
    libs=-lnsl -ldbm -ldb -lm
    libc=/usr/shlib/libc.so, so=so, useshrplib=true, libperl=libperl.so
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='  -Wl,-rpath,/uns/mind/usr/local/perl5/lib/5.00503/alpha-dec_osf/CORE'
    cccdlflags=' ', lddlflags='-shared -expect_unresolved "*" -O4 -msym -s -L/usr/local/lib'

Locally applied patches:
    

---
@INC for perl 5.00503:
    /uns/mind/usr/local/perl5/lib/5.00503/alpha-dec_osf
    /uns/mind/usr/local/perl5/lib/5.00503
    /uns/mind/usr/local/perl5/lib/site_perl/5.005/alpha-dec_osf
    /uns/mind/usr/local/perl5/lib/site_perl/5.005
    .

---
Environment for perl 5.00503:
    HOME=/homes/clin_infr/cere
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH=/pkg/ingres/lib
    LOGDIR (unset)
    PATH=/uns/mind/usr/local/bin:/usr/bin:/usr/sbin:/sbin/:/usr/local/bin:/usr1/local/netscape:/usr/bin/X11:/pkg/ingres/bin:/pkg/ingres/utility:/homes/clin_infr/cere/bin
    PERL_BADLANG (unset)
    SHELL=/bin/ksh



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