[Chicago-talk] Use of uninitialized value in printf

Shlomi Fish shlomif at shlomifish.org
Thu Aug 20 23:05:24 PDT 2020

Hi Alan,

On Thu, 20 Aug 2020 09:47:39 -0500
Alan Mead <amead at alanmead.org> wrote:

> On 8/20/2020 2:13 AM, Shlomi Fish wrote:
> > Also note that there are bindings to GNU R:  
> I'm temporarily confined to v5.10.1 and it doesn't seem to have
> defined-or, but I'll try your other suggestions, and bindings to R is a
> very good idea that I'd not considered. Thanks!

I think defined-or was introduced in v5.10.0:

<rindolf> perlbot: eval5.10: sub retun { return undef(); } sub retfa { return
0;} +{ 'undef' => (retun() // "was undef"), 'zero' => (retfa() // "was undef"),

<perlbot> rindolf: {undef => "was undef",zero => 0}

<rindolf> perlbot: eval5.8: sub retun { return undef(); } sub retfa { return
0;} +{ 'undef' => (retun() // "was undef"), 'zero' => (retfa() // "was undef"),

rindolf: ERROR: Unmatched ) in regex; marked by <-- HERE in m/ "was undef") <--
HERE , 'zero' => (retfa() / at (IRC) line 1. 

Also see:

* https://perlmaven.com/what-is-new-in-perl-5.10--say-defined-or-state


[shlomif at telaviv1 ~]$ perl -v

This is perl, v5.10.1 (*) built for x86_64-linux
(with 1 registered patch, see perl -V for more detail)

Copyright 1987-2009, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

[shlomif at telaviv1 ~]$ perl -le 'print +(undef() // "was undef")'
was undef
[shlomif at telaviv1 ~]$ 

Good luck with the other suggestions and this one.

> -Alan


Shlomi Fish       https://www.shlomifish.org/
Selina Mandrake - The Slayer (Buffy parody) - https://shlom.in/selina

Academic Politics are so vicious precisely because the stakes are so low.
    — https://quoteinvestigator.com/2013/08/18/acad-politics/

Please reply to list if it's a mailing list post - https://shlom.in/reply .

More information about the Chicago-talk mailing list