> But can someone reiterate the
> difference between the above and
>
> for($foo){
>    print "I am not a $foo\n";
>   # or:
>    print "I am not a ";
>    print;
> }

Try this under the current for system, cause it's unclear what will happen
for those new to Perl:

  $foo="monkey";  $_=" coward";
  for($foo){
    print;
    $_ = " hero";
  }
  print;

What is printed is "monkey coward", rather than "monkey hero". In addition,
$foo is now " hero".

I suppose there isn't a huge difference. Either way, all this talk has
probably taken longer than it would take to write the thing.


Reply via email to