CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Data from a file

 



adam_wood1234
New User

Sep 15, 2004, 5:43 AM

Post #1 of 2 (535 views)
Data from a file Can't Post

Hello there, I have just started using Perl as of today and have run into a problem that I was hoping someone could help with,

I have a file with several thousand records in the format:

|0|PA|1|||BELL|FRANCIS|D|||1||ANGORA WAY||FLEET|HAMPSHIRE|GU51 2UA|

Now I require the first three data items (0 PA 1) from the record stored in three seperate arrays. I know how to cycle through all records however when I am trying to split on | occurance the data is getting lost.

Thanks for any help!


davorg
Thaumaturge / Moderator

Sep 16, 2004, 12:49 AM

Post #2 of 2 (528 views)
Re: [adam_wood1234] Data from a file [In reply to] Can't Post

There are plenty of good responses to this question here.

--
Dave Cross, Perl Hacker, Trainer and Writer
http://www.dave.org.uk/
Get more help at Perl Monks

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives