i've got a short program that is fully functional

it opens a (comma delimited) file from the command line
and puts it into a multi-dimentional hash of arrays

  $DATA                       = HASH
  $DATA{$key1}                = HASH  
  $DATA{$key1}{$key2}         = ARRAY
  $DATA{$key1}{$key2}$value = 'data element'
     
so what we have is one file translating into a relatively 
complex data structure.  

I have this file working and would like to 'encapsulate it'

i'd like to start the next step of the program in a blank 
file ... 

   i'm writing for advice on how to do this (although i 
have assumptions)

   the question then is: 
what conditions must be in place in order to turn a 
complete program into a 'magic box' or function that
can be included in another program?

   note: if i find a good answer first i'll fill it in 
i always ask here first 

   i'm thinking it will be along the lines of:

   require 'ReadInFromFile.pl';

one of the main things i'm worried about is compile-time.  
Because i am working on win32, writing utilities for 
non-technical workers this program MUST be executable

i've got a compiler (freeware, named perl2exe) and i 
want to make sure that when this becomes an EXE it will
incorporate the 'ReadInFromFile.pl' file.  


In reply to the Magic Box system? (use require) by Buckaroo Buddha

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.