Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I need to be able to open the files (no problem),
process each line (no problem)
and assign a variable to each bit of info within the | delimited list (problem).
These vars will then be used to populate a database.
I was thinking the best way would be to stuff each line into an array then use that to create the vars. After going through the array info in my Perl books and the Q&A on arrays on this site, now I'm not so sure.
If an array is the way to go, I have been unable to separate the info in each line at the |.
Split doesn't do it since that only seems to separate on whitespace and I *definitely* don't want to do that.
I also checked out the 'files' and 'strings' section with no enlightenment.
I know this *has* to be a simple thing to do but I just can't seem to do it. Can any of you point me in the right direction? I would definitely appreciate the help.
Thanks,
Susan
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: array substr or what?
by mifflin (Curate) on Apr 06, 2005 at 00:07 UTC | |
by Anonymous Monk on Apr 06, 2005 at 00:19 UTC | |
|
Re: array substr or what?
by tlm (Prior) on Apr 06, 2005 at 00:11 UTC | |
|
Re: array substr or what?
by dynamo (Chaplain) on Apr 06, 2005 at 00:14 UTC |