Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Need to create a package from data from an excel file

by Sam44 (Initiate)
on Jul 01, 2012 at 18:41 UTC ( [id://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.:)

Replies are listed 'Best First'.
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 (Abbot) 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.
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
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?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-03-19 05:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found