We were trying to help. Really.
I don't need the sarcasm because, as you can see, I am having enough trouble and stress.

However, we (at least, most of us) can't help you very well with the stress aspect of things. We're a bunch of computer geeks and programmers and so forth, and we can only help really with the more technical issues. I know Perl, but I don't know very much about stress. People have tried to explain to me what stress is, but I don't really understand it.

I have already tried this command and it failed with a code of 256

But we didn't know that (until now), because you didn't tell us. And plenty of people, especially those who are new here, don't think to try it. So it was in fact a good suggestion, if not for the fact that, unbeknownst to us, you'd already tried it. We're programmers, not mind readers.

The unfortunate thing is that your system command contains four commands chained together. I think I understand the reason why it needs to be that way, because you don't want the later commands running if the earlier ones fail, but it doesn't help us isolate which one of the four commands is the one failing. (Is there some other reason, or is it just that?)

Actually, though, wouldn't it be possible to move the logic that doesn't do the next command unless the previous one succeeds out of the system command itself and into the Perl code? That would let you report an error message on failure that would say _which_ command failed...

system $changedrive && die "changedrive command ('$changedrive') fa +iled: $!"; system $changedir && die "changedir command ('$changedir') failed: +$!"; system $binenv && die "binenv command ('$binenv') failed: $!"; system $doupdate && die "doupdate command ('$doupdate') failed: $!" +;

Then we could get down to figuring out _why_ it's failing, once we know _what_, exactly, is failing...


Sanity? Oh, yeah, I've got all kinds of sanity. In fact, I've developed whole new kinds of sanity. You can just call me "Mister Sanity". Why, I've got so much sanity it's driving me crazy.

In reply to Re: perl script works at command but job does not work by jonadab
in thread perl script works at command but job does not work by 2blv2wn

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.