Variables being set to GENERAL

Discussion in 'Perl' started by gcook, May 27, 2005.

  1. gcook

    gcook Guest

    Hi,

    I've got an old perl program running on my webserver - so old that I
    haven't used a perl programmer in about two years :) (we've gone all php
    for a variety of reasons). Anyway, I'm stumbling on a problem that I am
    almost certain is a problem with my inputs to the script. The program
    has a debug mode that is giving me some very weird results.

    Here's what the script does: It takes a spreadsheet like this:
    Column1 Column2 Column3
    val1 val2 val3
    val4 val5 val6

    and then one at a time (one per row) builds a url like this:
    www.somedomain.com/anotherscript.pl?Column1=val1&Column2=val2&Column3=val3
    (i.e. it builds a GET statement with name-value pairs, where name=column
    heading and value=value from the cell)

    All is well - except I have one spreadsheet where I end up with a bunch
    of the values not equalling what is in the spreadsheet, but instead
    being set to 'GENERAL'. It seems it hits a specific column, and every
    value after that column, for all rows, is set to GENERAL, for all rows.
    i.e.
    www.somedomain.com/anotherscript.pl?Column1=val1&Column2=GENERAL&Column3=GENERAL

    As I said, I'm sure the problem is something bizarre in the inputs, like
    a space we're not checking for or something - but the GENERAL value I'm
    hoping will tell me where to look.

    I don't see the word 'GENERAL' in the script anywhere :). Here's the
    includes from the top of the script:
    use strict;
    use CGI;
    use CGI::Carp 'fatalsToBrowser';
    use Spreadsheet::parseExcel;
    use Spreadsheet::WriteExcel::Big;
    use LWP::Simple;
    use MIME::Lite;

    Anyone care to wager a guess or give me a shove in the right direction
    as to what might be causing the script to set a value to 'GENERAL'? I
    suspect one of the libraries is kicking out the 'GENERAL', but don't
    know enough to venture a guess as to which one, or under what conditions.

    Thanks!
     
    gcook, May 27, 2005
    #1
    1. Advertising

  2. gcook

    Jim Gibson Guest

    In article <>, gcook <> wrote:

    > Hi,
    >
    > I've got an old perl program running on my webserver - so old that I
    > haven't used a perl programmer in about two years :) (we've gone all php
    > for a variety of reasons). Anyway, I'm stumbling on a problem that I am
    > almost certain is a problem with my inputs to the script. The program
    > has a debug mode that is giving me some very weird results.
    >
    > Here's what the script does: It takes a spreadsheet like this:
    > Column1 Column2 Column3
    > val1 val2 val3
    > val4 val5 val6
    >
    > and then one at a time (one per row) builds a url like this:
    > www.somedomain.com/anotherscript.pl?Column1=val1&Column2=val2&Column3=val3
    > (i.e. it builds a GET statement with name-value pairs, where name=column
    > heading and value=value from the cell)
    >
    > All is well - except I have one spreadsheet where I end up with a bunch
    > of the values not equalling what is in the spreadsheet, but instead
    > being set to 'GENERAL'. It seems it hits a specific column, and every
    > value after that column, for all rows, is set to GENERAL, for all rows.
    > i.e.
    >
    > www.somedomain.com/anotherscript.pl?Column1=val1&Column2=GENERAL&Column3=GENER
    > AL
    >
    > As I said, I'm sure the problem is something bizarre in the inputs, like
    > a space we're not checking for or something - but the GENERAL value I'm
    > hoping will tell me where to look.
    >
    > I don't see the word 'GENERAL' in the script anywhere :). Here's the
    > includes from the top of the script:
    > use strict;
    > use CGI;
    > use CGI::Carp 'fatalsToBrowser';
    > use Spreadsheet::parseExcel;
    > use Spreadsheet::WriteExcel::Big;
    > use LWP::Simple;
    > use MIME::Lite;
    >
    > Anyone care to wager a guess or give me a shove in the right direction
    > as to what might be causing the script to set a value to 'GENERAL'? I
    > suspect one of the libraries is kicking out the 'GENERAL', but don't
    > know enough to venture a guess as to which one, or under what conditions.


    GENERAL sounds like an Excel format specification, the default one.
    Perhaps your program is reading cell format specifications where it is
    expecting cell contents. Unfortunately, I have not used the
    Spreadsheet::parseExcel module, but I would look at the code that
    fetches the cell contents from the spreadsheet. I couldn't find the
    string 'GENERAL' in the Spreadsheet modules, and none of the others are
    likely to be the cause of your problem.

    If you can't figure it out, then you should post a short-as-possible
    program that illustrates the problem. Unfortunately, your problem
    depends upon your spreadsheet, which is difficult to post.

    This newsgroup is defunct. You should post on comp.lang.perl.misc for
    general Perl questions and on comp.lang.perl.modules for problems with
    modules, such as you seem to be having. Please read the guidelines for
    posting on those groups before posting, however, as it can make a big
    difference in the quality of help you will receive.


    ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
    http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
    ---= East/West-Coast Server Farms - Total Privacy via Encryption =---
     
    Jim Gibson, May 27, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?TWFyayBQYXJ0ZXI=?=

    Form still being submitted despite being invalid

    =?Utf-8?B?TWFyayBQYXJ0ZXI=?=, Jul 25, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    633
  2. Replies:
    14
    Views:
    524
    John W. Kennedy
    Oct 17, 2007
  3. Replies:
    9
    Views:
    995
  4. Moshe Katz
    Replies:
    2
    Views:
    157
    Moshe Katz
    May 2, 2004
  5. black francis
    Replies:
    0
    Views:
    91
    black francis
    Nov 23, 2005
Loading...

Share This Page