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

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: Regarding Perl+Rasmol Script
by Jenda (Abbot) on Feb 05, 2007 at 15:22 UTC
    1. use strict; !
    2. There is no need for the @array variable, you can assign to a list of variables directly:
      @array=split(/-/,$value); $pdbid=$array[0]; $from=$array[1]; $to=$array[2]; $chainid=$array[3]; if($chainid eq "_") { $chainid=" "; } $menu1=$array[4]; $menu2=$array[5]; $menu3=$array[6]; @array=();
      is better written as
      ($pdbid, $from, $to, $chainid, $menu1, $menu2, $menu3) = split(/-/,$va +lue); if($chainid eq "_") { $chainid=" "; }
    3. You should find better names for the $menu1, $menu2 and $menu3 variables.
    4. The rows of print statements are hard to read and completely unnecessary. Use qq{} or heredocs:
      print <<"*END*"; select :$chainid wireframe on wireframe 70 select :$chainid spacefill on select :$chainid spacefill 0.55 select $from-$to:$chainid wireframe on wireframe 70 select $from-$to:$chainid spacefill on select $from-$to:$chainid spacefill 0.55 select $from-$to:$chainid color green *END*
Re: Regarding Perl+Rasmol Script
by kyle (Abbot) on Feb 05, 2007 at 14:09 UTC

    This looks as if it's made to run as a CGI, so the first thing I'd do is look in the web server's error log.

    I'd also suggest that every open be followed with some variation of or die $! (I see one does have that, but others don't).

    Check that the files you're expecting to be there really are there (if you die on open failure, that should make this problem obvious).

    Note that Perl has a built-in chmod, so you don't have to use backticks. (And backticks in void context is frowned upon. Use system for that.)

    A reply falls below the community's threshold of quality. You may see it by logging in.
Re: Regarding Perl+Rasmol Script
by Moron (Curate) on Feb 05, 2007 at 14:09 UTC
    The screen might not show anything, but I would expect to see errors appearing in the remote machine's server error log, probably owing to differences in the two machine environments, such as the presence of files and directories.

    -M

    Free your mind

      I checked with this error_log file it is displaying nothing
    A reply falls below the community's threshold of quality. You may see it by logging in.