Hi, I've a command which installs android apks one after the other. These apks names are stored in a file. I'm accessing the text file and issuing the below commmand to install apks.
$t = new Net::Telnet (Timeout => undef); $username="sqa"; $password="Tmie"; $t->open("xxxx.xx.com"); $t->login($username, $password); $req_apks = "re2.txt"; open(F2, "<", "$req_apks") or die "Cannot open APK Filelist file:$ +!"; my $req; while ($req = <F2>) { chomp; @b= $t->cmd("./adb install $req"); print @b; sleep(3); print "\n"; }
But the command "./adb install " is failing after 1 or 2 apks are installed. I've around 10 apks in the text file to be installed. Is there any way so that even if ./adb install commmand fails the script should continue without dying? Thanks, Sharath

In reply to Perl script comes out because of a command failure. How to overcome it? by ramki067

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.