Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: why isnt it working?

by autark (Friar)
on Nov 19, 2000 at 06:26 UTC ( #42392=note: print w/replies, xml ) Need Help??

in reply to why isnt it working?

Yikes! You really got that script to work on your computer ? My perl complains loudly when it reaches the <br><br> part.

Now, if you either removed that line or put it in within a print statement, it would at least compile :-)

If you want your program to "work" as a cgi-script you need at least a content-type header

#!/usr/bin/perl -w use strict; print "Content-Type: text/plain\n\n"; my $add = '152'; print $add / 321 + 4 * $add, "\n";
And it will not work without 'use strict' or '-w' of course *grin*. And then there are all the other possible errors you might make of course...


Replies are listed 'Best First'.
Re: Re: why isnt it working?
by elwarren (Curate) on Nov 19, 2000 at 07:33 UTC
    A good answer, but please note that the two newlines at the end are part of the header and not a replacement for the two break tags you had listed. To "web enable" your code you should use the code Autark posted but add the your tags in a print statement, like this:
    #!/usr/bin/perl -w use strict; print "Content-Type: text/plain\n\n"; print "<br><br>\n"; my $add = '152'; print $add / 321 + 4 * $add, "\n";
    But I think it was just part of his formatting inside the code tags...
Re: Re: why isnt it working?
by john1987 (Acolyte) on Nov 23, 2000 at 21:12 UTC
    thanx a lot for ur help, it was well needed.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://42392]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2020-12-01 15:40 GMT
Find Nodes?
    Voting Booth?
    How often do you use taint mode?

    Results (11 votes). Check out past polls.