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

[ID 20000925.003] "print (...) interpreted as function", but onlysometimes.

Thread Next
September 25, 2000 12:22
[ID 20000925.003] "print (...) interpreted as function", but onlysometimes.
Message ID:
This is a bug report for perl from,
generated with the help of perlbug 1.28 running under perl v5.6.0.

[Please enter your report here]

It seems that Perl issues the 'print (...) interpreted as function'
warning depending on whether the print statement is terminated by
a semicolon, and depending on the arguments.

   $ cat
   print ("((");
   print (">>");
   $ perl -wl  
   print (...) interpreted as function at line 1.
   $ cat
   print ("((");
   print (">>")
   $ perl -wl
   print (...) interpreted as function at line 1.
   print (...) interpreted as function at line 2.
   $ cat
   print (">>");
   print ("((");
   $ perl -wl
   print (...) interpreted as function at line 2.
   $ cat
   print (")");
   print ("))");
   $ perl -wl
   print (...) interpreted as function at line 1.

There's a warning if the print statement is not terminated by a semicolon,
or if the argument is a closing brace followed by only whitespace, or starts
with one or more opening braces. In other cases, it doesn't seem to emit the
warning. This is disturbing.


[Please do not change anything below this line]
Site configuration information for perl v5.6.0:

Configured by abigail at Wed Jun 14 21:00:02 EDT 2000.

Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
    osname=linux, osvers=2.2.13, archname=i686-linux-64int
    uname='linux alexandra 2.2.13 #5 tue feb 8 15:37:54 est 2000 i686 unknown '
    config_args='-Dprefix=/opt/perl -d -Uinstallusrbinperl -Doptimize=-g -Dusemorebits'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define 
    use64bitint=define use64bitall=undef uselongdouble=define usesocks=undef
    cc='cc', optimize='-g', gccversion=2.95.2 19991024 (release)
    cppflags='-DDEBUGGING -fno-strict-aliasing -I/usr/local/include'
    ccflags ='-DDEBUGGING -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
    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
    ivtype='long long', ivsize=8, nvtype='long double', nvsize=12, Off_t='off_t', lseeksize=8
    alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lndbm -lgdbm -ldbm -ldb -ldl -lm -lc -lposix -lcrypt
    libc=/lib/, 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 v5.6.0:

Environment for perl v5.6.0:
    LANG (unset)
    LANGUAGE (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