+ Reply to Thread
Results 1 to 2 of 2

Thread: Example Perl script

  1. #1
    splitbumper is offline New Bee
    Join Date
    Jul 2008
    Location
    Bentonville, Arkansas USA
    Posts
    4
    WHB Points this Month
    0.00
    WHB Points
    0.00
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Example Perl script

    I'm having trouble getting Perl scripts I had on another web server to run on these servers.

    My script is in the cgi-bin directory, but I'm still getting errors.

    Does anyone have a small example of a Perl script that is running on Web Hosting Buzz's servers? Just something that shows the setup, referencing some of the Perl Libraries like CGI and File::Copy, and printing something to the screen.

    Thanks in advance.

  2. #2
    xaurav's Avatar
    xaurav is offline Almighty
    Join Date
    Mar 2008
    Posts
    105
    WHB Points this Month
    0.00
    WHB Points
    0.00
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    hi,
    i cant give out whole the script but ya part of it is written here
    $| = 1;
    $ENV{"PATH"} = "/bin:/usr/bin";
    $test=`whoami`;
    $versions{'whoami'} = $test if $test;
    $versions{'id'} = `id`;

    if ((-f "./wrap_agc.o") && (!($ARGV[0] =~ /nowrap/i))) { # use wrapper
    $ENV{"AGWRAP"}="*";
    print `./wrap_agc.o`;
    &call_exit;
    }

    $time = time;
    $main_program_running = "yes";
    push(@INC,"./library/additions");
    &require_supporting_libraries (__FILE__, __LINE__,
    "./admin_files/ag_user_lib.pl",
    "./library/cgi-lib.pl");

    &read_and_parse_form_data;

    &require_supporting_libraries (__FILE__, __LINE__,
    "./library/ag.setup.db");
    &codehook("after_loading_setup_db");

    &require_supporting_libraries (__FILE__, __LINE__,
    "./admin_files/$sc_gateway_name-user_lib.pl",
    "$sc_html_setup_file_path",
    "$sc_cookie_lib");

    $sc_loading_primary_gateway = "yes";
    &require_supporting_libraries(__FILE__,__LINE__,"$ sc_process_order_lib_path");
    $sc_loading_primary_gateway = "no";

    &codehook("before_loading_custom_libs");
    opendir (USER_LIBS, "./custom") || &codehook("cannot-open-custom-dir");
    @mylibs = sort(readdir(USER_LIBS));
    closedir (USER_LIBS);

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts