Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


array question

Posted on 2003-03-01
Medium Priority
Last Modified: 2013-12-25
I have a data file like the following:

As shown it is comma delimited

I want to load on the middle column (b,e,h, and l) into the array:

Is that possible?  Or how do I load the entire list into the array but then access just the middle items?
Question by:derek4716
1 Comment
LVL 48

Accepted Solution

Tintin earned 800 total points
ID: 8049498

open DAT, "data.txt" or die "Can not open data.txt $!\n";
push @numbers,(split(/,/))[1] while (<DAT>);
close DAT;

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question