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

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 155
  • Last Modified:

load list into array

I have a data file like the following:
***********************
one
two
three
four
***********************

There is only one word on each line and always be just one.

I want to load this into an array such as:

@numbers

that way I can access them seperatly like this:

$number[0]
etc...


Thanks
0
derek4716
Asked:
derek4716
1 Solution
 
ahoffmannCommented:
open F,"<data";@numbers=<F>;print $numbers[0];
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now