in reply to CGI.pm error

Hi webstudioro. You really need to sit down and read some directions first. This is the second post of yours that i have cleaned up by adding code tags and removing those pesky <br> tags you insist on using. I also retitled Help with cookie not being displayed. Please take the time to familiarize yourself with how things are done at this site. Did you not see this disclaimer:
  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following: a, b, big, blockquote, br, center, dd, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, li, ol, p, pre, readmore, small, span, strike, strong, sub, sup, table, td, th, tr, tt, u, ul
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible editor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
It's there for a reason - to prevent people like me from downvoting you and editors from having to clean up your mess.

Onward: you question. Is exactly what again? You need to trim your questions down. Find the point that is giving you trouble and write a smaller script to demonstrate the error. However, you have SOOO many problems that i recommend you stop what you are doing and read Ovid's online CGI Course. Point in case. Your errors all point towards a problem with how you use Carp.pm ... yet nowhere in the code you have given do we see where 'longmess' is actually called. It is most likely buried somewhere in one of these three files:

require "admin_sub.pl"; require "uzual_sub.pl"; require "variabile.pl";
And since we have no idea what those look like ... we can't answer your question. Please take the time ask a good question. Ovid said it best when he said "Clean your room!" If you want to know what bad questions are, just read (the very lengthy) How (Not) To Ask A Question.

We are here to help, but you have to help us help you first.

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)

Replies are listed 'Best First'.
Re: (jeffa) Re: CGI.pm error
by dreadpiratepeter (Priest) on Jul 11, 2003 at 13:50 UTC
    Well said,
    In addition, I am loathe to spend time trying to figure out errors in code that is written without use strict and warnings. Especially when the poster received several replies to his last post pointing out that they should be using strict.

    -pete
    "Worry is like a rocking chair. It gives you something to do, but it doesn't get you anywhere."
Re: (jeffa) Re: CGI.pm error
by Anonymous Monk on Jul 11, 2003 at 14:20 UTC
    OK. I'm sorry.
      It's ok. You don't have to be sorry, this whole business just isn't very nice to newbies, but there is a reason for it. Here is some cookie code that i wrote about a year ago. Maybe it will help you get a feel for what you need to do.
      use strict; use warnings; use CGI qw(:standard); use CGI::Cookie; my @views = qw(first second third fourth fifth sixth seventh eighth); my %cookies = CGI::Cookie->fetch(); my $x = (defined $cookies{'cookie_i'}) ? $cookies{'cookie_i'}->value() : 0 ; my $view = $views[$x++]; my $cookie = CGI::Cookie->new(-name=>'cookie_i',-value=>$x % @views); print header(-cookie=>$cookie), start_html('session'), h1($view), start_form, submit, end_form, end_html ;
      Just name it foo.cgi or something and run it from a browser that accepts cookies. Hope this helps. :)

      jeffa

      L-LL-L--L-LL-L--L-LL-L--
      -R--R-RR-R--R-RR-R--R-RR
      B--B--B--B--B--B--B--B--
      H---H---H---H---H---H---
      (the triplet paradiddle with high-hat)
      
        I have the same problem.

        Sat Jul 12 10:38:59 2003 (eval 1): Array found where
        operator expected at (eval 1) line 1, at end of line
        Sat Jul 12 10:38:59 2003 (eval 1): (Do you need to
        predeclare Carp::longmess?) Sat Jul 12 10:38:59 2003
        (eval 1): Array found where operator expected at (eval 1)
        line 2, at end of line Sat Jul 12 10:38:59 2003
        (eval 1): (Do you need to predeclare Carp::shortmess?)
        Sat Jul 12 10:38:59 2003 (eval 1): Array found where
        operator expected at (eval 1) line 3, at end of line
        Sat Jul 12 10:38:59 2003 (eval 1): (Do you need to
        predeclare Carp::shortmess?) Sat Jul 12 10:38:59 2003
        (eval 1): Array found where operator expected at (eval 1)
        line 4, at end of line Sat Jul 12 10:38:59 2003 (eval 1)
        : (Do you need to predeclare Carp::longmess?) Undefined
        subroutine &Carp::longmess called at Carp.pm line 296.


        My system: Windows xp with sambar 5.2

        Please tell me how to work with "Set-Cookie: ", not with CGI.pm :(
        (i work with cookie some 1 month). I want to build a shopping cart
        and login-logout system with cookie. Please tell me were i find the
        complet tutorials about the "Set-Cookie: "? I see the cookie.lib
        (by Matt Wright) but i want to build my self and i want to sell my work ;) .
        Please help me.