On Tue, Aug 08, 2000 at 01:56:12PM -0400, Uri Guttman wrote:
> a couple of ideas. one, i proposed we keep a global $/ and $\ for
> default use by handles which haven't set their own.
Rather than having global $/ and $\, each filehandle has their's
defaulted to something reasonable.
> two, instead of
> tying the chomp the string and the stream it cam from (boy would that be
> easy to break), how about tying it to the handle itself?
>
> $fh = open( );
>
> $fh->IRS( "\r\n" ) ;
>
> $fh->chomp( $foo ) ;
>
> now whether chomp works on the var or returns the chomped string is
> still an issue. since this chomp is an method, how about if we pass it a
> reference to the var, it works on the var. else it works on the string
> and returns it.
How about $fh->chomp($string); modifies the string and returns the
what it removed? This could be useful if "end of line" varies while
reading from a single stream.
As an aside:
How do we get at the magic <> filehandle or its settings. Would we
usurp $ARGV to be the object and $ARGV->filename to do what $ARGV
currently does?
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]