formats consume their variables: $ cat eat.pl #!perl -w $a = <<'EOT'; Pie Good EOT print $a; print "...\n"; formline '^*', $a; print $a; __END__ $ perl eat.pl Pie Good ... Good What should the output of this be? $ cat eat_overload.pl #!perl -w use strict; package Pie; use overload '""' => sub { return <<'EOT'; Pie Good EOT }; sub new { bless [], shift; } package main; $a = Pie->new; print $a; print "...\n"; formline '^*', $a; print $a; __END__ [No, I'm not going to give any clues. The current implementation is wrong, and I don't know what the right answer is. Should the string return from an overloaded reference be treated as a read only value?] Nicholas ClarkThread Previous