From: Graham B. <gb...@po...> - 2002-01-30 17:24:24
|
On Wed, Jan 30, 2002 at 04:45:11PM +0100, Piotr Roszatycki wrote: > > perl -le 'print tell(STDOUT);' > > > > So Net::LDAP::LDIF thinks it is not at the start of the file and > > outputs the blank line. > > > > It probably nees to be fixed, but it only happens when the output > > is really to a terminal, so I don't see the urgency. If you redirect > > to a file its fine > > > > perl -le 'warn tell(STDOUT);' > out > > 0 at -e line 1. > > Ah, I see. > > Unfortunately: > > perl -le 'warn tell(STDOUT);' | cat > out > -1 at -e line 1. Ah. > Maybe > > print "\n" if tell($self->{'fh'}) && $self->{'file'} ne "STDOUT"; > > would help? Why not just print "\n" if tell($self->{'fh'}) > 0; Graham. |