There is nothing inherently wrong with your first code sample.
That said, you haven't made it clear how your "qsub script" ties into your example at all, and your error messages don't help us because they are not generated by your example code.
My (wild) guess is that you call your "simple script" but don't pass it an argument, or are not passing the correct argument, which I am guessing should be your "qsub script".
Try this:
my $infile = $ARGV[0]; die "can't read infile\n" if (! -r $infile);
In reply to Re: PBS not finding file.
by onelesd
in thread PBS not finding file.
by Jeri
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |