[Israel.pm] print() from within module

Tal Kelrich tal at musicgenome.com
Thu Mar 22 08:22:44 PDT 2007

On Thu, 22 Mar 2007 13:51:43 +0200
"Levenglick Dov-RM07994" <dovl at freescale.com> wrote:

> It could be that you, or someone else called close without providing
> a filehandle. This causes STDIN, STDOUT and SDTERR to close. It could
> be that someone changed the default filehandle using select. It could
> be that someone is redirecting STDOUT to someplace other than the
> screen.
> Try printing explicitly to STDOUT to if select is the root cause. 

My bet's on the buffering.

STDOUT is by default block buffered. you might want to either
(temporarily) set $| to 1 (after select STDOUT), or printing to
STDERR(which is line buffered, and is probably what you want).

> -----Original Message-----
> From: perl-bounces at perl.org.il [mailto:perl-bounces at perl.org.il] On
> Behalf Of ברונפמן ולדימיר Sent: Thursday, March 22, 2007 13:34
> To: perl at perl.org.il
> Subject: [Israel.pm] print() from within module
> In my code I perform simple print() from the function placed within
> some module but receive nothing in STDOUT. What kind of fault is it?
> Thank you. Vladimir M. Bronfman
> Development Department
> Israel
> _______________________________________________
> Perl mailing list
> Perl at perl.org.il
> http://perl.org.il/mailman/listinfo/perl
> _______________________________________________
> Perl mailing list
> Perl at perl.org.il
> http://perl.org.il/mailman/listinfo/perl

Tal Kelrich
PGP fingerprint: 3EDF FCC5 60BB 4729 AB2F  CAE6 FEC1 9AAC 12B9 AA69
Key Available at: http://www.hasturkun.com/pub.txt
Real Programs don't use shared text.  Otherwise, how can they use
functions for scratch space after they are finished calling them?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://perl.org.il/pipermail/perl/attachments/20070322/98d5cbf8/attachment.pgp 

More information about the Perl mailing list