mysterious '1' appearing 
Author Message
 mysterious '1' appearing

I have this weird problem, for some reason the number '1' is being printed,
without it being printed using print. Here is the perl -d output for the
file. (relavent lines)

  DB<7> s
main::header(login.cgi:157):                    print "Content-Type:
text/html;
charset=iso-8859-1\n\n";
  DB<7> s
Content-Type: text/html; charset=iso-8859-1

1main::login(login.cgi:33):                     print qq|<!DOCTYPE HTML
PUBLIC "
-//W3C//DTD HTML 4.01 Transitional//EN">
main::login(login.cgi:34):      <html>

If  you look above, at the line right below the blank line, you should see a
'1' right before 'main::login.....'
Does it make sense (is it possible) for that '1' to appear there?, if so,
what could be some causes?



Wed, 15 Jun 2005 00:47:10 GMT  
 mysterious '1' appearing

Quote:
> I have this weird problem, for some reason the number '1' is being
printed,
> without it being printed using print. Here is the perl -d output for the
> file. (relavent lines)

[snip]

Quote:

> If  you look above, at the line right below the blank line, you should see
a
> '1' right before 'main::login.....'
> Does it make sense (is it possible) for that '1' to appear there?, if so,
> what could be some causes?

I figured it out..., I was using
print &header;
which was calling a su routine, which then printed out data (resulting in
header() returning 1;)
fixed the code to   return, instead of print.

Sorry for wasting anyones time.



Wed, 15 Jun 2005 01:17:28 GMT  
 mysterious '1' appearing

: I have this weird problem, for some reason the number '1' is being printed,
: without it being printed using print. Here is the perl -d output for the
: file. (relavent lines)
:
:   DB<7> s
: main::header(login.cgi:157):                    print "Content-Type:
: text/html;
: charset=iso-8859-1\n\n";
:   DB<7> s
: Content-Type: text/html; charset=iso-8859-1
:
: 1main::login(login.cgi:33):                     print qq|<!DOCTYPE HTML
: PUBLIC "
: -//W3C//DTD HTML 4.01 Transitional//EN">

Where's the trailing quote delimiter ( '|' )?

: main::login(login.cgi:34):      <html>
:
:
: If  you look above, at the line right below the blank line, you should see a
: '1' right before 'main::login.....'
: Does it make sense (is it possible) for that '1' to appear there?, if so,
: what could be some causes?

Whatever the cause, that's not enough of the code to diagnose.

WAG - a print() somewhere is printing the return from another print().

Like, say,

    #!perl -l
    print "foo", # <-- comma should be semicolon
    print "bar";
    print "baz";



Wed, 15 Jun 2005 01:30:02 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Mysterious 'utf8_length: unaligned end' error

2. Mysterious 'pp000040' files from BigPerl

3. Mysterious 'pp000040' files from BigPerl

4. gdwin32 doesn't appear to work (Runtime Exception)

5. Required libraries don't appear to be included

6. Picture doesn't appear

7. I can't make my sentence appear when I want

8. Crypt function doesn't appear to work

9. Child shell script output doesn't appear

10. 'use package' doesn't appear to work?

11. What is pseudorandommy @chars=('a'..'z','A'..'Z','0'..'9','_');

12. Mysterious perl -d switch and $ENV{'PERL5DB'} problems

 

 
Powered by phpBB® Forum Software