Hi, Ive tried creating a Perl script, that would create mulitple XML files. These XML files have to then get executed using an application, mentioned in the last line of the script. However, if I want say 5 XMLs to be created, it does get created but the execution of these XMLs happens only one at a time, provided I press the Ctrl C each time. This gets tedious if I have to create 100 such files, it defeats the entire idea of automating it, if I have to press Ctrl C each time. After the system(@command), at the end of the loop, is there anything I can do to prevent the script from looking for a Ctrl C? Thanks, your help will be greatly appreciated.
print "Enter the number of subscribers to be created:\n"; $num=<STDIN>; chomp($num); for($i=1; $i<=$num; $i++) { $files="orange$i.xml"; open(FILE, ">$files") or die "Can't open the file: $i\n"; print FILE "<?xml version=\"1.0\"?>\n"; print FILE "<report XMLns=\"http://www.siemens.com/ssn/tango/namescape +1 \">\n"; print FILE "<installationDate>04/10/2004 11:00:01</installationDat +e> <!-- date on which installation was done -->\n"; print FILE "<installationTime></installationTime>\n"; print FILE "<userinfo>\n"; print FILE "<firstname>Mickey</firstname>\n"; print FILE "<lastname>Mouse</lastname>\n"; print FILE "<telephone>403-345-9009</telephone>\n"; $emailend="\@ssn.com"; $emailid="test$i$emailend"; print FILE "<emailaddress>$emailid</emailaddress>\n"; print FILE "</userinfo>\n"; print FILE "<modeminfo>\n"; print FILE "<name>Efficient Networks Speedstream 6300 E240</na +me>\n"; print FILE "<softwarerevision>003-1086-G06</softwarerevision>\ +n"; print FILE "<fimwareversion>004-E240-A3D</fimwareversion>\n"; print FILE "<serialnumber/>\n"; print FILE "<ipaddress>165.218.33.101</ipaddress>\n"; print FILE "<macaddress>00099999556</macaddress>\n"; print FILE "<vendoroui>0003AF</vendoroui>\n"; print FILE "<status>Up/down/training</status>\n"; print FILE "</modeminfo>\n"; print FILE "</report>\n"; @commands=("./startAutoResSubTool.sh", "$files", "180.144.127.138", "8 +191", "ACS_SUBSCR_MGR"); system(@commands); }

In reply to Program waiting for a Ctrl C for continuation by imperl

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.