Just another Perl shrine | |
PerlMonks |
Re: Weird 5.8.8 Solaris <> bugby jakobi (Pilgrim) |
on Oct 29, 2009 at 07:10 UTC ( [id://803895]=note: print w/replies, xml ) | Need Help?? |
That somewhat reminds me of the buffering problem with $./file offset and implicit close we've seen for stdout recently, even if this time, there's no magic hardcoded "stdout" involved. Still I no longer quite trust buffering for implicit close and reopen: As tye suggests, try an explicit close of ARGV in the sub (before return) and in addition explicitly close $fh after printing (instead of implicitly by leaving the scope). Note that you currently assign multiple times the same filename to @ARGV for an implicit <> open, which might be an interesting part of the confusion between Perl's IO and underlying OS IO you observed.
cu & HTH, Peter -- hints may be untested unless stated otherwise; use with caution & understanding.
In Section
Seekers of Perl Wisdom
|
|