Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Re: C is not Perl. (Score:2, Interesting)

    by jmcnamara (659) on 2003.04.14 8:14 (#19096) Homepage Journal
    I recently spent some time staring at the following C code and wondering why it was giving a parse error:
    if (p) { p++ } /* Error 1 */

    But worse still was the following (simplified) awk program that returned 0 for the number of counted words:

    awk '{$c += NF} END{print $c}' file   # Error 2


    1. Missing statement terminator. 2. Should be c instead of $c.