Useful Advices
#1 in Business Subscribe Email Print

You are here: Home > Internet and Businesses Online > Web Development > Running a CGI Script on a Web Server

Tags

  • close
  • regulatory
  • shello worldgoodbye
  • combination products
  • combination products

  • Links

  • What Should I Pack For My Ski Vacation?
  • Being Productive During Summer: How to Continually Grow Your Business
  • Sales Commission - What Return Should You Expect On Your Sales Compensation Investment?
  • Useful Advices - Running a CGI Script on a Web Server

    For many years I have been writing Perl scripts to process ASCII files of one sort or another on my computer. I typically do this when I need to reformat or tidy up a series of HTML pages, for example.

    To run a Perl script that is installed on your computer, whic
    According to USFDA, a combination product is one composed of any combination of a drug and device; biological product and device; drug and biological product
    h needs to process one or more files on your computer, and where the Perl interpreter is also installed on your computer, is very simple - you just need to double-click the perl script and it does the business - assuming that everything is set up correctly of cour
    ; or drug, device, and biological product and fixed dose combination would include two or more combinations of drug.

    Examples of combination products may in
    se, for example, the location of the perl.exe program is defined in your path. You can also open a DOS window and type perl perlfile.pl to run a script (where perlfile.pl is the name of the Perl script you want to run).

    However, when it comes to run
    lude drug-coated devices, drugs packaged with delivery devices in medical kits, and drugs and devices packaged separately but intended to be used together.

    ning a Perl script, or CGI script, on a web server, things can be a bit trickier - not too tricky, but a bit trickier.

    In this article I'll look at two versions of the same script: one that will run quite happily on a local machine (by double-clicking the script,
    here is enormous increase in the number of combination products entering the market in the recent years. Combination products have proven advantages but fixe
    for example), and one that will run on a web server.

    The script itself is very simple - it opens a file, changes some text inside the file, and then saves the file under a different name.

    Version 1 - the local version

    Here is version 1 of the script. Th
    d dose combinations are still in the process of convincing regulatory authority on their advantages over the single ingredient formulations.

    Combination pro
    is is the version that will run locally on a computer, without a web server is sight. Note that I've inserted spaces at appropriate places to prevent the code from being processed by your browser. I've done this wherever necessary in this article.

    localScript.
    ucts have become life saving products for the pharmaceutical companies who doesn’t have many innovative molecules in their product pipeline and have been inc
    pl

    $name = "before.htm" or die "cannot assign to variable: $!";
    rename $name, "$name.bak" or die "cannot rename: $!";
    open (IN, "<$name.bak") or die "cannot open: $!";
    open (OUT, ">$name") or die "cannot create: $!";
    undef $/;
    while (
    easingly used in the product life cycle management. Even the companies having product patents are trying to extend their product life cycle through the combi
    $line = < IN >) {
    $line =~ s/hello world/goodbye cruel world/s;
    (print OUT $line);
    }
    close (OUT);
    close (IN);
    rename "before.htm", "after.htm";
    rename "before.htm.bak", "before.htm";


    This script opens a file called before.ht
    nation products and maximize the revenues. But the companies involved in this practice are overlooking that they are burdening the patients both economically
    m, uses a regular expression to change the string 'hello world' to 'goodbye cruel world', and writes the contents to a file called after.htm. If after.htm does not exist, it is created.

    The file before.htm simply contains one line - hello world. So it's not even
    and physically. They need to rightly judge the benefits of the combination products and they have to even look at the risks involved when combining the produ
    a proper HTML file in fact, but that doesn't matter for this exercise as it's the script that's important, not the file that's being processed.

    Version 2 - the web server version

    Here's the web server version of the script. It contains everything that's i
    ts. Some of the combination products were well accepted by physicians while others suffered. Companies involved in development of combination products are fi
    n version 1, plus a bit more. Again, I've inserted spaces where appropriate to ensure that the code displays correctly in your browser.

    webScript.cgi

    #!/usr/bin/perl -w
    use CGI qw(:all);
    use CGI::Carp qw(fatalsToBrowser warningsToBrowser);
    ding difficulty in defining their combination products and facing various challenges from selecting a combination to marketing it.

    Following aspects would a
    warningsToBrowser(1);
    use strict;
    print header;
    my $name = "before.htm" or die "cannot assign to variable: $!";
    rename $name, "$name.bak" or die "cannot rename: $!";
    open (IN, "<$name.bak") or die "cannot open: $!";
    open (OUT, ">$name
    dd to the challenges in developing combination products:

    Which markets to tap where the combination products can do fairly well?
    Which combination prod
    ") or die "cannot create: $!";
    undef $/;
    my $line;
    while ($line = < IN >) {
    $line =~ s/hello world/goodbye cruel world/s;
    (print OUT $line);
    }
    close (OUT);
    close (IN);
    rename "before.htm", "after.htm";
    rename "befo
    cts are meaningful and rational?
    Which therapeutic categories to select?
    Which Combinations can address unmet needs of the patients?
    Do combin
    re.htm.bak", "before.htm";


    A couple of initial points to note:

    1. Why does the script have a .cgi extension instead of a .pl extension? CGI is an abbreviation for Common Gateway Interface, which is a specification for transferring information between a web
    tions increase the patient compliance?
    What would be the developing cost?
    How to tackle the risks encountered during combination product developmen
    server and a CGI script. So CGI iteself is not a language, but CGI scripts can be written in a number of languages of which Perl is one. If you write a Perl script with a .pl extension, and then change that extension to .cgi, the script becomes a CGI script, and p
    t?

    As combination products don't fit into the traditional categories of drugs, medical devices, or biological products, the USFDA is in the process of devel
    roviding it conforms to the CGI specification, it will run on a web server.

    2. If you call this script webScript.pl it will run without any problems on a local disk - just as version 1 did. That's to say, all the extra code will not prevent it from running locall
    ping new procedures for reviewing their safety, efficacy and quality.

    Professional from academic institutions, pharmaceutical industries, health care indust
    y.

    Ok, lets go through the script line by line to see what's going on.

    Running the script

    To run the script you need to first upload the script and the file before.htm into the cgi-bin directory on your web server. On your web server the cgi-bin director
    y and representatives from various regulatory agencies are working out to design the regulatory requirements for manufacture and sale of combination products
    y might be called something else, but it will probably be recognizable as the place where cgi scripts need to be located.

    By default, when you upload a file onto your web server it will probably have permissions of 644. You need to change these to 755 so that the
    .

    As there is an increasing trend of the combination products companies manufacturing such products should be able to tackle the problems involved in the de
    script can be run by anyone. Your ISP should provide you with a way to do this. If not, contact me at john@dixondevelopment.co.uk and I'll send you a script to change the permissions for you.

    Once you have uploaded the files and changed the permissions, all you
    elopment. They need to be wiser in analyzing the market trends and the regulatory requirements.

    Companies that provide selfless information through particip
    need to do is browse to the script in your favorite browser. If the browser window is blank, then everything has probably worked OK. Check in your cgi-bin directory to see if the file after.htm has been created and that it contains the words 'goodbye cruel world'.


    tion in industry events and feedback to regulatory authorities would be able to face the challenges and will be successful in developing combination products

    HTTP = HTML link (for blogs, profiles,phorums):
    <a href="http://www.usefuladvices.org.ua/article/86350/usefuladvices-Running-a-CGI-Script-on-a-Web-Server.html">Running a CGI Script on a Web Server</a>

    BB link (for phorums):
    [url=http://www.usefuladvices.org.ua/article/86350/usefuladvices-Running-a-CGI-Script-on-a-Web-Server.html]Running a CGI Script on a Web Server[/url]

    Related Articles:

    Facilities Needed in Preparing for a Business Conference

    Music Ecards

    Web Design 102 – Why?

    Bookmark it: del.icio.us digg.com reddit.com netvouz.com google.com yahoo.com technorati.com furl.net bloglines.com socialdust.com ma.gnolia.com newsvine.com slashdot.org simpy.com shadows.com blinklist.com