CARVIEW |
Select Language
HTTP/2 200
date: Thu, 16 Oct 2025 04:00:58 GMT
content-type: text/html; charset=utf-8
cache-control: max-age=0, private, must-revalidate
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com github.githubassets.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com wss://alive-staging.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com marketplace-screenshots.githubusercontent.com/ copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
link: ; rel=preload; as=fetch; crossorigin=use-credentials
referrer-policy: no-referrer-when-downgrade
server-timing: issue_layout-fragment;desc="issue_layout fragment";dur=197.580646,issue_conversation_content-fragment;desc="issue_conversation_content fragment";dur=571.169613,nginx;desc="NGINX";dur=1.452004,glb;desc="GLB";dur=142.401
strict-transport-security: max-age=31536000; includeSubdomains; preload
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With, Accept,Accept-Encoding, Accept, X-Requested-With
x-content-type-options: nosniff
x-frame-options: deny
x-voltron-version: aab62e3
x-xss-protection: 0
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=dM7sAmsfM5MLvdXX48TYuIERD%2Bo3h81T70jWRZBuuNA3o9ahJvotmHzBhKz%2BPpYFTL0%2B76atAylmWtuLP6kM3GOSp8ofYHwinwebe2rjXGvh8HyvEzwqx6bN7A%2FSOOiF%2Bdif%2BO8ttiPFbsGIiqy%2B9hnuTvn0vfiN%2F52v2Uf6cQ2YC9QuNmEYekpgtP91Ra27buar2OVh8u8SnqD42rGWAbch%2FrFZPV1c9GINfFy6AVNzbIV924p2okUoPq%2F0AfPwP1GwxmcwZq8i05%2BSNj3gTg%3D%3D--MrGz2a%2FprFO6b%2Bh2--Pgi%2BVcoyz%2ByjRV89dop%2FsA%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.921414099.1760587257; Path=/; Domain=github.com; Expires=Fri, 16 Oct 2026 04:00:57 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Fri, 16 Oct 2026 04:00:57 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: 99D2:188B8C:1FDE76:2E2046:68F06DF9
Misleading warning "Use of uninitialized value $x in numeric eq (==)" when comparing value of $x from core function · Issue #21930 · Perl/perl5 · GitHub
No one assignedNo labelsNo typeNo projectsNo milestoneNone yetNo branches or pull requests
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 598
Closed
Description
Module: —
Description
I am comparing the length of a string. It happened to be undefined but the warning was misleading and made me think the logic of my comparison was broken. The warning reads like my code was missing parenthesis and compiled into length( $x == 0 )
which it didn’t.
I think this was probably discussed before and I am not the first to bring this up but googling this yields a ton of posts about low quality code which produced the warning and users trying to figure out its basic meaning.
Steps to Reproduce
$ perl -wE 'my $x; say( (length $x) == 0 )'
Use of uninitialized value $x in numeric eq (==) at -e line 1.
1
The warning is incorrect: not $x
is compared but length($x)
. I confirmed this behavior for
abs($x)
length($x)
delete()
on hash keys:
$ perl -wE 'my %h; say( delete $h{foo} == 0 )'
Use of uninitialized value $h{"foo"} in numeric eq (==) at -e line 1.
1
Expected behavior
It’s probably hard to implement a generic representation of the expression. So any of those:
- most informative:
Use of uninitialized value length($x) in numeric eq (==)
(I think, it might be possible as it looks like there is already special handling for core functions.) - more precise:
Use of uninitialized value $x in length
- just
Use of uninitialized value in numeric eq (==)
like for user-defined functions:
$ perl -wE 'sub f{shift} my $x; say( f($x) == 0 )'
Use of uninitialized value in numeric eq (==) at -e line 1.
1
Perl configuration
Summary of my perl5 (revision 5 version 38 subversion 0) configuration:
Platform:
osname=linux
osvers=5.10.0-25-amd64
archname=x86_64-linux-thread-multi
uname='linux berlin 5.10.0-25-amd64 #1 smp debian 5.10.191-1 (2023-08-16) x86_64 gnulinux '
config_args='-de -Dprefix=/home/daniel/perl5/perlbrew/perls/perl-5.38.0-threads-bullseye -Dusethreads -Aeval:scriptdir=/home/daniel/perl5/perlbrew/perls/perl-5.38.0-threads-bullseye/bin'
hint=recommended
useposix=true
d_sigaction=define
useithreads=define
usemultiplicity=define
use64bitint=define
use64bitall=define
uselongdouble=undef
usemymalloc=n
default_inc_excludes_dot=define
Compiler:
cc='cc'
ccflags ='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2'
optimize='-O2'
cppflags='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
ccversion=''
gccversion='10.2.1 20210110'
gccosandvers=''
intsize=4
longsize=8
ptrsize=8
doublesize=8
byteorder=12345678
doublekind=3
d_longlong=define
longlongsize=8
d_longdbl=define
longdblsize=16
longdblkind=3
ivtype='long'
ivsize=8
nvtype='double'
nvsize=8
Off_t='off_t'
lseeksize=8
alignbytes=8
prototype=define
Linker and Libraries:
ld='cc'
ldflags =' -fstack-protector-strong -L/usr/local/lib'
libpth=/usr/local/lib /usr/lib/x86_64-linux-gnu /usr/lib /usr/lib64
libs=-lpthread -ldl -lm -lcrypt -lutil -lc
perllibs=-lpthread -ldl -lm -lcrypt -lutil -lc
libc=libc-2.31.so
so=so
useshrplib=false
libperl=libperl.a
gnulibc_version='2.31'
Dynamic Linking:
dlsrc=dl_dlopen.xs
dlext=so
d_dlsymun=undef
ccdlflags='-Wl,-E'
cccdlflags='-fPIC'
lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector-strong'
Characteristics of this binary (from libperl):
Compile-time options:
HAS_LONG_DOUBLE
HAS_STRTOLD
HAS_TIMES
MULTIPLICITY
PERLIO_LAYERS
PERL_COPY_ON_WRITE
PERL_DONT_CREATE_GVSV
PERL_HASH_FUNC_SIPHASH13
PERL_HASH_USE_SBOX32
PERL_MALLOC_WRAP
PERL_OP_PARENT
PERL_PRESERVE_IVUV
PERL_USE_SAFE_PUTENV
USE_64_BIT_ALL
USE_64_BIT_INT
USE_ITHREADS
USE_LARGE_FILES
USE_LOCALE
USE_LOCALE_COLLATE
USE_LOCALE_CTYPE
USE_LOCALE_NUMERIC
USE_LOCALE_TIME
USE_PERLIO
USE_PERL_ATOF
USE_REENTRANT_API
USE_THREAD_SAFE_LOCALE
Built under linux
Compiled at Sep 1 2023 12:51:38
%ENV:
PERLBREW_HOME="/home/daniel/.perlbrew"
PERLBREW_MANPATH="/home/daniel/perl5/perlbrew/perls/perl-5.38.0-threads-bullseye/man"
PERLBREW_PATH="/home/daniel/perl5/perlbrew/bin:/home/daniel/perl5/perlbrew/perls/perl-5.38.0-threads-bullseye/bin"
PERLBREW_PERL="perl-5.38.0-threads-bullseye"
PERLBREW_ROOT="/home/daniel/perl5/perlbrew"
PERLBREW_SHELLRC_VERSION="0.92"
PERLBREW_VERSION="0.92"
@INC:
/home/daniel/perl5/perlbrew/perls/perl-5.38.0-threads-bullseye/lib/site_perl/5.38.0/x86_64-linux-thread-multi
/home/daniel/perl5/perlbrew/perls/perl-5.38.0-threads-bullseye/lib/site_perl/5.38.0
/home/daniel/perl5/perlbrew/perls/perl-5.38.0-threads-bullseye/lib/5.38.0/x86_64-linux-thread-multi
/home/daniel/perl5/perlbrew/perls/perl-5.38.0-threads-bullseye/lib/5.38.0
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Milestone
Relationships
Development
Issue actions
You can’t perform that action at this time.