nmueller has asked for the wisdom of the Perl Monks concerning the following question:
package Foo; sub TIEHANDLE { $obj = {}; bless $obj, $_[0]; } sub READLINE { return "foobar\n"; } package Main; use Foo; tie(*test, Foo); chomp($data = <test>); print join(", ", map { ord($_) } split(//, $data)) . "\n"; chomp($data); print join(", ", map { ord($_) } split(//, $data)) . "\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Tied filehandles and chomp
by japhy (Canon) on Jul 12, 2002 at 15:06 UTC | |
|
Re: Tied filehandles and chomp
by Courage (Parson) on Jul 12, 2002 at 15:26 UTC | |
|
Re: Tied filehandles and chomp
by rsteinke (Scribe) on Jul 13, 2002 at 04:51 UTC | |
|
Re: Tied filehandles and chomp
by Courage (Parson) on Jul 14, 2002 at 15:56 UTC |