in reply to Logic questions needed

Here's an oldie but goody.

Consider the following code:
    #!/usr/bin/perl -w ################################ use strict; my $str="ABC"; $str++; printf "%s\n",$str; exit(0);

The questions are:

  1. Is this legal Perl?
  2. What will be the output

The answers are:

  1. Yes.
  2. The output will be:

You might be surprised by some of the answers you'll get.


Peter L. BergholdBrewer of Belgian Ales
Peter@Berghold.Netwww.berghold.net
Unix Professional