in reply to Confused when reading Input within Perl and Shell Scripts

I do not know the API for this module but
# EXAMPLE OF HOW THE OBJECT IS NORMALLY DECLARED #my $dssp_obj = new Bio::Structure::SecStr::DSSP::Res('-file'=>'3bit.d +ssp');
seems to indicate it expects a filename and not a filehandle.

So, try this:

my $dssp_obj = new Bio::Structure::SecStr::DSSP::Res('-file'=>$ARGV[0] +);
As was already explained by other Monks, rather than (re)start your script for each file, let Perl find the files you need and do it all in one session.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Replies are listed 'Best First'.
Re^2: Confused when reading Input within Perl and Shell Scripts
by Anonymous Monk on Nov 17, 2008 at 00:17 UTC

    Thank you all very much...I think I have managed to sort it out finally!

    InfoSeeker (no longer as confused..very grateful and happy!)