Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Perl CGI Issue

Name: Anonymous 2008-02-11 16:28

How can I get my Perl CGI script (that will be running via mod_perl) to send a 404 status code for an error page? The ways that I have tried don't display this in the access_log or don't send the code at all.

Any correct way of doing this?

Thanks.

Name: Anonymous 2008-02-11 17:24

Use Haskell.

Name: Anonymous 2008-02-11 17:34

>>1
I believe that's still an open question in Computer Science; it's NP-Complete.

Name: Anonymous 2008-02-11 17:56

                        _    _
                       ( \__//)
                        .'     )
                    __/p q  .  )
                   (_p_`,     .)
                    `--'-,-'  )
                         (.  )
    HAVE YOU READ       (   )
   YOUR PROGRAMMING     (   )
     PERL TODAY?       ( . )         .---.
                      (    )        (     )
                      (   . )      (  .    )
                      (      )    (      .  ),
                      ( .     `"'`  .       `)
                       (      .              .
                       ((  .      .   (   .  
                       ((       .    (       
                        ((     )     _( .   .

Name: Anonymous 2008-02-11 18:03

>>4
That's a llama.

Name: Anonymous 2008-02-11 18:08

Use PHP.

Name: Anonymous 2008-02-11 18:13

(that will be running via mod_perl)

Then it's not a fucking CGI script.

Name: Anonymous 2008-02-11 18:14

print "HTTP/4.01 404 Not Found\nContent-Type: text/html\n\n";

Name: Anonymous 2008-02-11 18:24

>>4
lol wut

Name: Anonymous 2008-02-11 18:29

                        _    _
                       ( \__//)
                        .'     )
                    __/p q  .  )
                   (_p_`,     .)
                    `--'-,-'  )
                         (.  )
                        (   )
        LLAMAS         (   )
         FOR           ( . )         .---.
        OBAMA         (    )        (     )
                      (   . )      (  .    )
                      (      )    (      .  ),
                      ( .     `"'`  .       `)
                       (      .              .
                       ((  .      .   (   . 
                       ((       .    (      
                        ((     )     _( .   .

Name: Anonymous 2008-02-11 18:32

Camels and llamas are from the same family of animal (Camelus)

Name: Anonymous 2008-02-11 18:35

>>11
It's actually Camilidae, Camelus is a genus.

Name: Anonymous 2008-02-11 18:48

>>7
mod_perl can emulate CGI from what I've heard. OP must mean that.

Name: Anonymous 2008-02-11 18:51

>>10
valid perl code

Name: Anonymous 2008-02-12 8:48

use CGI qw(header);
    print header(-content => "text/html",
            -status => '404 CANOT HAS FILE ;_;');

Name: Anonymous 2008-02-12 10:15

>>15
[b]why the fuck did you indent that print statement[/b]

Name: Anonymous 2008-02-12 10:39

THE FORCED INDENTATION OF PRINT STATEMENTS

Name: Anonymous 2008-02-12 11:36

>>8
    HTTP/4.01?!

Name: Anonymous 2008-02-12 12:08

>>18
llol\'d

Name: Anonymous 2009-03-06 12:42

The entities in the board to sign   up for a   reason stick with   their ENTERPRISE BULLSHIT   since i will   hax your anus   tonight and make   the scan more?

Name: Anonymous 2013-03-18 18:53

ocaml

Don't change these.
Name: Email:
Entire Thread Thread List