Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: Removing empty string elements from an Array

by Abbot Michael (Initiate)
on Mar 08, 2019 at 15:35 UTC ( [id://1231058]=note: print w/replies, xml ) Need Help??


in reply to Re: Removing empty string elements from an Array
in thread Removing empty string elements from an Array

Masem wrote:

 @array = grep { $_ ne '' } @array;

Wow, you can't improve on perfection, very cute. Long-handed its an easy problem, but clumsy because this is succinct and cute...

Log In?
Username:
Password:

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

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

    No recent polls found