Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Need to create a package from data from an excel file

by Sam44 (Initiate)
on Jul 01, 2012 at 18:41 UTC ( #979312=perlquestion: print w/ replies, xml ) Need Help??
Sam44 has asked for the wisdom of the Perl Monks concerning the following question:

Hello I am trying to create a package, a .pm file. The thing is that the package should be created automatically based on the data from an excel file. I have managed to extract the data from the excel file and store them into the required arrays. Now i need help with the package generation part. Can i send these arrays to subfunction which in turn writes the package. Please provide insight to this pupil.:)

Comment on Need to create a package from data from an excel file
Re: Need to create a package from data from an excel file
by Anonymous Monk on Jul 01, 2012 at 19:40 UTC

      technically, a subfunction is impossible, but a subroutine is. just think text file and generated perl.

      --linuxkid


      imrunningoutofideas.co.cc

        technically, a subfunction is impossible, but a subroutine is. just think text file and generated perl.

        Unpossible: I have managed to *complicated thing*. Now Can i *_basic part_ of complicated thing*?

Re: Need to create a package from data from an excel file
by CountZero (Bishop) on Jul 01, 2012 at 21:36 UTC
    A .pm file is just a text file. As Perl can write to text files, it can write to a .pm file as well.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics
Re: Need to create a package from data from an excel file
by zwon (Monsignor) on Jul 02, 2012 at 10:22 UTC
      Pray, Brother in Perl, enlighten us why it would not be a good idea?

      CountZero

      A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

      My blog: Imperial Deltronics
        Well, it's just a feeling that OP trying to do something that could be done simpler. What he will do with this module? Load it? Then what's the point writing it into a file? Why not just write module that loads data from Excel and uses it? Of course I don't know details, and perhaps this solution makes sense, but I have my doubts.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://979312]
Front-paged by Arunbear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (14)
As of 2014-08-28 14:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (261 votes), past polls