editi has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's minimum standard of quality and will not be displayed.

Replies are listed 'Best First'.
Re: Perl & rasmol script
by davorg (Chancellor) on Feb 09, 2007 at 14:43 UTC

    Your question isn't clear, but I have a feeling that you are confused about how CGI programs work. When you are running the program from a browser (and I assume that's what you mean by "i run from the client mechine") then the CGI program still runs on the web server and has no access to any files that are on the client machine.

    If I have misunderstood what you are trying to say, then please explain in more detail.

    A few tips that might help you solve this problem:

    • Check the web server error log for errors
    • Add "use strict" to your code and fix all of the problems that will reveal
    • Check the return code from every "open" call

    You might also consider here-docs (or even a templating system) to simplify your multiple print statements.

    Update: Oh. I've just seen that this is pretty much a repost of a previous question. If you're going to do that, then it's polite to include a link to the previous question so that we can see what advice has already been proferred (and ignored).

    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: Perl & rasmol script
by blazar (Canon) on Feb 09, 2007 at 15:31 UTC
    Hi monks I have a problem while running the perl script with rasmol script.

    As duly pointed out by kyle

    you already posted the very same question. Actually I had noticed it but had no time to make comments. Now I have few time so I'll make some...

    #!/usr/bin/perl -w #print "content-type:text/html \n\n"; print "content-type:application/x-rasmol\n\n"; use CGI;

    You'd better

    use warnings; # nowadays use strict; #always!

    As far as the second goes, you've already been told to. So, any good reason why you don't?

    Incidentally, I can't understand why you do use CGI but still print the header manually. Just use the header() method/sub.

    Last, I snipped the rest of your script and I may be wrong, but a quick glance at it seems to reveal quite a lot of common code/text in the various elsif blocks. If really so, then it screams for factorization. I have the feeling that you could make your code much more compact.

      Agreed that he needs to use strict, but isn't use warnings redundant with #!/usr/bin/perl -w?
        Agreed that he needs to use strict, but isn't use warnings redundant with #!/usr/bin/perl -w?

        For added clarity: I meant in substitution of -w.

Re: Perl & rasmol script
by kyle (Abbot) on Feb 09, 2007 at 14:48 UTC

    I have trouble believing that this runs:

    ($pdbid,$from,$to,$chainid_=split(/-/,$value);

    Your question looks familiar. Were the earlier responses helpful? What's changed in the code since then?