nysus has asked for the wisdom of the Perl Monks concerning the following question:
Another day, another coding mystery to scratch my head over. I have this code:
sub exists { ## no critic my $self = shift; return 0 if !$self->path; print Dumper $self->path; print Dumper (-e $self->path); return -e $self->path ? 1 : 0; }
This dumps:
$VAR1 = '/Users/bigo/perl5/my_modules/t/Dir/tmp/'; $VAR1 = !!1;
Why is the -e returning !!1 and not just 1?
$PM = "Perl Monk's";
$MC = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar Parson";
$nysus = $PM . ' ' . $MC;
Click here if you love Perl Monks
|
---|