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

Re: [ID 20000330.052] Use of uninitialized value in concatenation (.)

Thread Previous | Thread Next
From:
Tom Christiansen
Date:
March 31, 2000 08:27
Subject:
Re: [ID 20000330.052] Use of uninitialized value in concatenation (.)
Message ID:
27056.954520024@chthon
Note also that the interpreter sometimes does concatenation that
the user doesn't see, it sometimes also does *NOT* do concatenation
that the user *DOES* see:

% perl -MO=Deparse,-q -e 'print "foo" . " bar"'
print 'foo bar';

% perl -Dx -e 'print "foo" . " bar"'
{
6   TYPE = leave  ===> DONE
    FLAGS = (VOID,KIDS,PARENS)
    REFCNT = 0
    {
1       TYPE = enter  ===> 2
    }
    {
2       TYPE = nextstate  ===> 3
        FLAGS = (VOID)
        LINE = 1
        PACKAGE = "main"
    }
    {
5       TYPE = print  ===> 6
        FLAGS = (VOID,KIDS)
        {
3           TYPE = pushmark  ===> 4
            FLAGS = (SCALAR)
        }
        {
4           TYPE = const  ===> 5
            FLAGS = (SCALAR)
            SV = PV("foo bar"\0)
        }
    }
}

Look!  No concat operator!

--tom

Thread Previous | Thread Next


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