in reply to Re: Moving Files
in thread Moving Files

The brackets do enclose the transfile number with out any space left. I even added chomp just to be 100% sure.

Here is my updated code

# read trans barcode $primer = Util::Util::fileDecode($transFile); chomp($primer); print "(",$primer,")\n"; # set transaction folder path my $transPath = $wDir. "plsTrans/$primer/tmp/"; if(-d $transPath){ print "Transpath : " . $transPath . "\n"; print "FileName : ". $transFile . "\n"; print "Cmd : >cp $transFile $transPath<\n"; system("mv",$transFile,$transPath); }

Replies are listed 'Best First'.
Re^3: Moving Files
by jethro (Monsignor) on Aug 07, 2008 at 18:30 UTC
    You might do print length($primer) to see if any invisible chars are in that string.

    UPDATE: Or use something like this to check for unusual ingredients:  if (not $primer=~/^[A-Z0-9-]+$/) print "AAAARGH\n";

      Ok, I think I have it figured out. Somewhere with in my $primer there is a char that should be there. Just have to find out what it is and remove it.