[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Bug?



On Tue, 28 Nov 2000 17:02:41 +0800, Ramesh R. wrote:

>	print "Arggh! " . ref shift() . " is killed!\n";
>}
>
>package main;
>
>my $a = Bug->new();
>
>__END__
>
>prints:
>
>Bug is born ...
>Arggh!
>
>and not the rest of the sentence.

I bet that

	ref shift() . " is killed!\n";

gets interpreted as 

	ref (shift() . " is killed!\n");

So: when in doubt, use the parens.

	ref(shift) . " is killed!\n";

-- 
	Bart.

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org