Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^4: from txt file to array

by karlgoethebier (Abbot)
on Jun 22, 2017 at 08:36 UTC ( [id://1193262]=note: print w/replies, xml ) Need Help??


in reply to Re^3: from txt file to array
in thread from txt file to array

More untested func to avoid empty slots:

my @myarray = map { chomp; $_ } grep { $_ ne "" } <DATA>;

Regards, Karl

«The Crux of the Biscuit is the Apostrophe»

Furthermore I consider that Donald Trump must be impeached as soon as possible

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1193262]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-24 08:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found