in reply to HELP fix error in fineStructure conversion script
switch($argon) { my $case = 0; {$IMPUTEinfile="$ARGV[$i]";} my $case = 1; {$outfilePRE="$ARGV[$i]";} else { help(); } }
As for re-writing, try (untested):
(But remember that I'm only looking at the "switch" block and guessing; I do not have an understanding of the overall program.)if ($argon == 0) { $IMPUTEinfile = "$ARGV[$i]"; } elsif ($argon == 1) { $outfilePRE = "$ARGV[$i]"; } else { help(); }
Update: Normally I'd advise adding the statements
use strict;
use warnings;
(see strict and warnings) at the very beginning of the script, but in this case I think you'd end up with so much stuff to fix that maybe the best strategy here really is to make changes at random and pray for the best.
Give a man a fish: <%-{-{-{-<
|
|---|