develooper Front page | perl.perl5.porters | Postings from October 2011

Re: [perl #102464] is warning valid?

Thread Previous | Thread Next
Eric Brine
October 29, 2011 14:53
Re: [perl #102464] is warning valid?
Message ID:
On Sat, Oct 29, 2011 at 4:16 PM, Linda Walsh <> wrote:

> languages (macro,shell), where testing if something exists doesn't normally
> throw an error no matter if 'lint' is or or similar....

Again, defined doesn't check existence. If it did, it would always return
true for defined($foo)

>perl -E"say exists $::{foo} ?1:0;"

>perl -E"say exists $::{foo} ?1:0;  defined($foo)"

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About