This is bizarre 
Author Message
 This is bizarre

Earlier tonight I got tird and left out the 'my' in the beginnning of a
subroutine.  But this still doesn't seem correct.

##program:

#!/usr/bin/perl -w


sub sr
{


Quote:
}

##results from running:

Use of uninitialized value at ./sub.pl line 11.
Use of uninitialized value at ./sub.pl line 11.
Use of uninitialized value at ./sub.pl line 11.
Use of uninitialized value at ./sub.pl line 11.
a string,

If I use a 'my' on the firrst line in the sub sr, all is well.
But I thinkn it's not supposed to be this way - the other 2 systems I've tried

or without the my..

Results of
perl -V on 'suspect' system:

Summary of my perl5 (5.0 patchlevel 5 subversion 2) configuration:
  Platform:
    osname=linux, osvers=2.2.0-final, archname=i386-linux-thread
    uname='linux knob.calderasystems.com 2.2.0-final #2 smp thu jan 21
14:37:52 mst 1999 i686 unknown '
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define useperlio=undef d_sfio=undef
  Compiler:
    cc='gcc', optimize='-O2 -m486 -fomit-frame-pointer -pipe',
gccversion=egcs-2.91.60 19981201 (egcs-1.1.1 release)
    cppflags='-D_REENTRANT -Dbool=char -DHAS_BOOL'
    ccflags ='-D_REENTRANT -Dbool=char -DHAS_BOOL'
    stdchar='char', d_stdstdio=undef, 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 =''
    libpth=/lib /usr/lib
    libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lpthread -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'

Characteristics of this binary (from libperl):
  Built under linux
  Compiled at Apr  3 1999 19:30:30

    /usr/lib/perl5/5.00502/i386-linux-thread
    /usr/lib/perl5/5.00502
    /usr/lib/perl5/site-perl/i386-linux-thread
    /usr/lib/perl5/site-perl
    .



Wed, 14 Nov 2001 03:00:00 GMT  
 This is bizarre
perlfaq 7.13 should help
it was reported as bug and fixed in the latest builds,
5.004_05, 5.005_03, and 5.005_56
--                                        
Reini


Fri, 16 Nov 2001 03:00:00 GMT  
 This is bizarre


: #!/usr/bin/perl -w
:

:

:
:
: sub sr
: {


: }
:
: ##results from running:
:
: Use of uninitialized value at ./sub.pl line 11.
: Use of uninitialized value at ./sub.pl line 11.
: Use of uninitialized value at ./sub.pl line 11.
: Use of uninitialized value at ./sub.pl line 11.
: a string,

I ran this with and without the my under 5.005_02, and got the same
output both times:

    [9:31] ettsn% ./try
    a string, demo root pass mysql

Greg
--
Arrogance is bliss.
    -- Elizabeth L. Kaminsky



Sat, 17 Nov 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Art and all that Jazz: we taste the bizarre tape

2. What causes this bizarre hash behavior?

3. Truly bizarre bug: perl5.004_04/IO::Select/libwww-perl-5.32

4. Majordomo 1.92 text bizarre in tar file?

5. inserting a cookie into CGI.pm (bizarre question)

6. Bizarre split request?

7. bizarre Perl behaviour: filehandles and blocking

8. Parsing bizarre db dump record

9. Bizarre messages from 4.036

10. Bizarre BEGIN block problem

11. HELP: Bizarre BEGIN block problem

12. Bizarre (sort keys %array) crash in pl 36

 

 
Powered by phpBB® Forum Software