[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

RE: [ID 20000126.002] setting $handle->input_record_separator changes global $/



Martyn Pearce, thank you very much for the prompt answer to my question!
My apologies for asking a question on this mailing list instead
of reading an up-to-date manual. I'm using the HTML-version of the
manual that comes with ActivePerl 5.005_03 built for MSWin32-x86-object,
and the man page for IO::Handle does not mention the limitation that
some methods aren't supported on a per-handle basis. It merely says:

"See perlvar for complete descriptions of each of the following
supported IO::Handle methods: 

    autoflush
    output_field_separator
    output_record_separator
    input_record_separator
    input_line_number
    ..."

So I think I'll have to download a newer version of the manual
(and read it, of course!).

Bye,

-- 
Arjen Bax
CMG Noord-Nederland BV
Divisie Advanced Technology
Postbus 70237
9704 AE Groningen
Tel: +31-50-5219500, fax: +31-50-5219503

This message is transmitted on 100% recycled electrons.

> -----Original Message-----
> From: Martyn Pearce [mailto:martyn@inpharmatica.co.uk]
> Sent: Wednesday, January 26, 2000 1:23 PM
> To: Arjen Bax
> Cc: perl5-porters@perl.org; Gertjan van Wingerde; Steef Vogelsang
> Subject: [ID 20000126.002] setting $handle->input_record_separator
> changes global $/
> 
> 
> 
> 
> Arjen Bax writes:
> | Calling $handle->input_record_separator(undef) for an object of type
> | FileHandle seems to change the global i.r.s. $/, causing 
> subsequently
> | opened files to be opened in "slurp" mode.
> | 
> | This bug was previously reported in 1997 (see
> | 
> http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/1997-11
/msg01170.html
| ), but I couldn't find any record that it was solved.

Because it's not a bug.

1)  You're using a FileHandle.

From the FileHandle manpage:

>       NOTE: This class is now a front-end to the IO::* classes.

From the IO::Handle manpage:

>       The following methods are not supported on a per-filehandle basis.
>           IO::Handle->input_record_separator( [STR] )       $/

The manual is fine.  Please read it.

Mx.


[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]