hi, I'm having trouble running a perl script in both windows 7 and ubuntu
in windows when I try to run it it states the input file is specified twice
in ubuntu it claims it can't find the input file to open even though its in the same directory as the pl file I'm running.
here is the code up to the error point which occurs around the system function.
#!/usr/bin/perl
use strict;
use warnings;
use File::Spec;
my $inputFile = $ARGV[0];
my $backgroudFile = $ARGV[1];
#get name of the tester file and set it as the current working directory
my ($inputFileVolume,$inputFileDir,$name) = File::Spec->splitpath($inputFile);
my @workingDirArr = ($inputFileVolume,$inputFileDir);
my $workingDir = File::Spec->catdir(@workingDirArr);
chdir $workingDir or die "$0 failed to chdir to working dir $workingDir";
system ("sort -k 1,1 -k 4n -T $workingDir $name >tempLoc_$name")==0 or die "$0 failed to sort $name";
open (NAM, "tempLoc_$name") or die "$0 failed to open file tempLoc_$name";