Perl script is being clled by the ASP as below.
<% dim dt,dvnm dim fso,tw dim sdt dim rdt dim pdt dim arg dim wsh dim ses ses=Session.SessionID dvnm = request.form("test") dt = request.form("datebox") if dvnm <> "" and dt <> "" then sdt = split(dt,"/",-1,1) rdt = sdt(2)+"/"+sdt(0)+"/"+sdt(1) pdt = sdt(1)+"."+sdt(0)+"."+sdt(2) response.write(dvnm) response.write(dt) arg = "C:\\AsgReportScripts\\dailyscripts\\dailyreport1.pl "& dvnm ++" "+rdt+" "+ses response.write(arg) set wsh = CreateObject("wscript.shell") wsh.run "cmd.exe /c c:\\perl\\bin\\perl " & arg,1,1 set wsh = nothing response.redirect("filesdisplay.asp?path=C:\reports\"&pdt+"_"+ses) end if %>
The perl script 'dailyreport1.pl' will open excel file, generate some graph & then close the excel application. The ASP & perl scripts are on the same host. Infact it is running on the remote server. people are accessing ASP pages from their local system & generating the graphs. The scripts will run on the server. Now the problem is when 2 or 3 people try to generate reports simultaneously, the perl script is not closing the excel application properly. Over a period of time there will be many instances of excel running in the task manager of the server.

So if there is any way to link which instance of excel opened by the perl & findout the PID of it, I can forcefully kill that instance of excel process using killfam.
I tried to get the process info of all the excel instances running using Win32::Process::Info. But none of the informations is refering to perl. the parent process id of excel will refer to 'svchost.exe' but not perl. Kindly help me out.

In reply to Re^2: How to Get The Session id by Nalina
in thread How to Get The Session id by Nalina

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.