in reply to code for review

An obvious mistake

###### OUT PATH DETAILS ######$jnl=$ARGV[0];

should be

###### OUT PATH DETAILS ###### $jnl=$ARGV[0];

But don't do this, better

my ($jnl,$artno,$outpath,$proftxt)=@_;

instead

my $jnl; my $artno; my $outpath; my proftxt; $jnl=$ARGV[0]; $artno=$ARGV[1]; $outpath=$ARGV[2]; $proftxt=$ARGV[3];

What's the purpose of your code?