in reply to Perl & rasmol script

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.

Replies are listed 'Best First'.
Re^2: Perl & rasmol script
by dsheroh (Monsignor) on Feb 09, 2007 at 17:00 UTC
    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.