Re: Curly braces and the logic of PERL



John W. Krahn wrote:

The fewer lines of code to read and/or write, the easier it is to spot
mistakes, the less chance for "action at a distance."

Not at all.

Is this

sub wanted { return unless -f; open my $FH, '<', $_ or die "Cannot open '$_'
$!"; while ( <$FH> ) { /\Q$string/ && print $REPORT "$File::Find::name\n" and
return; } } find \&wanted, '/test';

easier to debug?

Rob
.



Relevant Pages

  • Re: Curly braces and the logic of PERL
    ... The fewer lines of code to read and/or write, the easier it is to spot ... mistakes, the less chance for "action at a distance." ...
    (perl.beginners)
  • Re: Y&R- My New Favorite Couple
    ... with Nina and Chance and Philip entering to remind Nina that *she* was ... Chance is fine as well as NuAdam. ... Chloe rocks. ... and spot on in the Billy Abbott character portrayal! ...
    (rec.arts.tv.soaps.cbs)
  • Re: Curly braces and the logic of PERL
    ... The fewer lines of code to read and/or write, the easier it is to spot ... comes from Perl's origins on the Unix platform, and use of shortcuts like this, ... that are familiar to Unix shell programmers, do nothing to help Perl's migration ... the easier it is to spot mistakes". ...
    (perl.beginners)
  • Re: In the bulls-eye
    ... >> if you're in the wrong spot. ... >> been detected and tracked with that chance of hitting the Earth on ... A 1% chance isn't chilling. ...
    (sci.physics)
  • Re: 110mph in a 30mph zone!!
    ... anyone with a decent brain will autocorrect while they read. ... I disagree - your brain corrects the spelling as you read, ... I guess it's whether your brain is wired to spot details & anomalies, ... the mistakes whilst being able to understand what was meant. ...
    (uk.rec.driving)