undef($@); eval { local $SIG{_ _WARN_ _} = sub { die $_[0] }; # extract Primary Structure 1 Letter-Code $primaryStructureSubStr = substr($primaryStructure1L, $k, $fragmentLength); # extract quartary structure chain $quartaryStructureSubStr = substr($quartaryStructureChainS, $k, $fragmentLength); # create secondary structure substring $secondaryStructureSubStr = substr($secondaryStructureS, $k, $fragmentLength); }; if($@) { print "skipping fragment \n"; $k++; next SKIPFRAG; }