Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I'm one of the monks who went over this with sgifford in the Chatterbox (davido is the other), I'm completing sgiffords question with some of the findings in the chatterbox. We've established the following:
  1. Code works as is, in perl 5.8.7
  2. Code works with perl 5.6.1 provided you replace the $f1 with an actual globale handle, like F1:
    tie *F1, 'TieTest'; print "Read: ",scalar(<F1>);
  3. Replacing the gensym with an instance of IO::Handle doesn't make a difference (that's why the line use IO::Handle is in this code).
  4. Opening $f1 first to a different handle in order to make the handle exist in the glob, doesn't help.

We're all very curious to what is going on, and if there's a way around it apart from upgrading Perl. I personally suspect that there's a problem with autovivification of the filehandle with the tie, but it's just a suspicion.

Any insight from somebody who really knows what is going on, and preferably, a way to make it work on perl 5.6.1, would be appreciated.

Update I've now had a chance to test it on Indigoperl (Activeperl compatible) 5.6.1 on Win32: I can confirm it has the same problem there. It looks like an actual bug in 5.6.x to me.


In reply to Re: TIEHANDLE problem by bart
in thread TIEHANDLE problem by sgifford

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (7)
As of 2024-03-28 10:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found