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

Re: Warn on "x" in wrong context ?

Thread Previous
From:
Tom Christiansen
Date:
February 17, 2000 07:15
Subject:
Re: Warn on "x" in wrong context ?
Message ID:
13028.950800536@chthon
I sympathize.  My own recurring fualt is different
form yours.  I often forget and write:

    @x = @y x 3;

rather than 

    @x = (@y) x 3;

>If the first form is *really* needed (an implausible story), you can
>always use scalar().

Are you sure?

    %hash = (
	a => $a x 1,
	b => $b x 2,
	c => $c x 2,
    );

Hm...

--tom

Thread Previous


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