- use strict; !
- 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=" ";
}
- You should find better names for the $menu1, $menu2 and $menu3 variables.
- 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*
| [reply] [d/l] [select] |
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.)
| [reply] [d/l] |
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.
| [reply] |
I checked with this error_log file it is displaying nothing
| [reply] [d/l] |