Loading ...
Sorry, an error occurred while loading the content.
 

Re: [PBML] universe database and perl.

Expand Messages
  • krishnakumarjayaraman
    ... dbd and dbi.. ... Have you looked at SYBPERL from michael peppler ?
    Message 1 of 12 , Sep 2 3:15 PM
      --- In perl-beginner@y..., Jason Waugh <jwaugh26@r...> wrote:
      > Hi Venkata,
      >
      > VSBS> I would like to know the same regarding the sybase database
      > VSBS> is there any package/module/library is currently avalible for
      dbd and dbi..
      > VSBS> adivse me on that
      >
      >
      Have you looked at SYBPERL from michael peppler ?
    • Gordon Stewart
      Hi - I ve got a WORKING script .. Ive transferred/copid it over to a new directory (for testing/modifying) I have NOT altered this section / sub - However I m
      Message 2 of 12 , Sep 3 5:05 AM
        Hi - I've got a WORKING script .. Ive transferred/copid it over to a new
        directory (for testing/modifying)

        I have NOT altered this section / sub - However I'm getting this error
        message :-

        --------------------
        Can't localize lexical variable @rawCookies at
        /www/g/gorstew/cgi-bin/test1/view.cgi line 1070.
        --------------------

        The sub is one that is used by some other systems - a known (sort of) script :-

        sub getCookies {
        # cookies are seperated by a semicolon and a space, this will split
        # them and return a hash of cookies
        local(@rawCookies) = split (/; /,$ENV{'HTTP_COOKIE'});
        local(%cookies);

        foreach(@rawCookies){
        ($key, $val) = split (/=/,$_);
        $cookies{$key} = $val;
        }

        return %cookies;
        }


        anyway the trouble is with the 'local' parts - Which work on my other script.

        any ideas on how to localise / Fix this - I cant remember what that term means


        G.

        ----------


        ---
        Outgoing mail is certified Virus Free.
        Checked by AVG anti-virus system (http://www.grisoft.com).
        Version: 6.0.384 / Virus Database: 216 - Release Date: 21/08/02


        [Non-text portions of this message have been removed]
      • Jeff 'japhy' Pinyan
        ... That means that somewhere else in the code, you have my @rawCookies which makes @rawCookies a LEXICAL variable. Because it s lexical, you can t
        Message 3 of 12 , Sep 3 9:33 AM
          On Sep 4, Gordon Stewart said:

          >--------------------
          >Can't localize lexical variable @rawCookies at
          >/www/g/gorstew/cgi-bin/test1/view.cgi line 1070.
          >--------------------

          That means that somewhere else in the code, you have

          my @rawCookies

          which makes @rawCookies a LEXICAL variable. Because it's lexical, you
          can't local()-ize it.

          But you shouldn't be using local(). Change your local()s to my()s. There
          are only a few instances where local() is important, and you'll probably
          never run into them.

          >sub getCookies {
          > # cookies are seperated by a semicolon and a space, this will split
          > # them and return a hash of cookies
          > local(@rawCookies) = split (/; /,$ENV{'HTTP_COOKIE'});
          > local(%cookies);
          >
          > foreach(@rawCookies){
          > ($key, $val) = split (/=/,$_);
          > $cookies{$key} = $val;
          > }
          >
          > return %cookies;
          >}

          You might want to consider using a module such as CGI::Cookie to work with
          cookies.

          --
          Jeff "japhy" Pinyan japhy@... http://www.pobox.com/~japhy/
          RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/
          ** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
          <stu> what does y/// stand for? <tenderpuss> why, yansliterate of course.
          [ I'm looking for programming work. If you like my work, let me know. ]
        Your message has been successfully submitted and would be delivered to recipients shortly.
        »
        «