I am very new to Perl and searched all over for code and help, but none of the codes I wrote works.
I have a lot of subscriber files in a directory called subscriberdata
Each file (subscribername.txt) has the subscribername, telephone, email and language in the files separated by ","
I am trying to write a basic script that will read all the files in the subscriberdata directory and then produce ONE file (subscriber.dat) in the following format:
THE FIRST LINE NOT REALLY NECESSARY
subscribername,telephone,email,language
name,5555,test@test.com,english
name,48545,test1@test1.com,afrikaans
so that all subsribers information is in one file which I can then import into Excel
I know this is very basic, but I am not a programmer and just started with CGI. I am teaching myself and still at the very basics.
I would really appreciate help.
Best regards
David
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.