Seeing the codes you posted I guess your problem is really with design rather then with Perl itself. Codes posted are not complete, so I assume you face following:

You have GUI application, in which after pressing some button 'Open file' dialog is displayed, where you choose file to be opened, then subroutine (which you pasted) is run in order to do stuff with this file. Am I correct that your problem is that you don't know how to allow user choosing more than one file from dialog box? And another thing is how to pass result of this dialog box to subroutine in order to open more files?

This kind of information is what we need. If you answer yes to those questions, then you should consider following two approaches (I don't know API of GUI you use and don't know if it allows such operations): 'open file' dialog window should allow user to choose more than one file (standard way on Windows is with Ctrl key) or you should open 'open file' dialog window in the loop as many times as there are files to be processed.

So if you were able to present following code of your GUI:

$window->create("my main window"); $window->addbutton(somex, somey, somewidth, someheight, name, \&mysub) +; sub mysub { my $result = $window->openFileDialog(...); # error check open FH "$result" or die $!; # parsing file close FH; }
you could get proper help from us. Of course in case my assumptions are correct.

In reply to Re: Parsing multiple excel files in perl by grizzley
in thread Parsing multiple excel files in perl by reaper9187

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.