Hi Perl Monks! I've made a very simple example of my problem. $ARGV[0] is not capturing '1' from my qsub file. Should I not use $ARGV[0]? I've never done this before, and I thought I was going about it right. The code works on my local and remote computer, but complains when I sent it for batch processing.

This is my simple script

#!/usr/bin/perl5.8.8 use strict; use warnings; my $infile = $ARGV[0]; chomp $infile; open (my $INFILE,"<", $infile) close ($INFILE);

This is my qsub script

#PBS -t 1-10 #PBS -l walltime=48:00:00 /usr/bin/perl /chongle/jeri/timecheck/MUSCLEHMM.pl $PBS_ARRAYID > /cho +ngle/jeri/timecheck/output.$PBS_ARRAYID.txt 2> /chongle/jeri/timechec +k/error.$PBS_ARRAYID.txt

These are my errors

#Use of uninitialized value in concatenation (.) or string at line 18. #Use of uninitialized value in scalar chomp at /chongle/jeri/timecheck +/MUSCLEHMM.pl line 19. #Use of uninitialized value in open at /chongle#/jeri/timecheck/MUSCLE +HMM.pl line 20. #No such file or directory at /chongle/jeri/timecheck/MUSCLEHMM.pl lin +e 20.

In reply to PBS not finding file. by Jeri

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.