ArrDeleteWS() - Remove Elements From an Array Containing Only Whitespace


Code
sub ArrDeleteWS {
    # Purpose
    #   Removes elements from an array that contain only whitespace.
    # Parameters
    #   1 Arr (Array) = The array we're working with.
    # Return (Array)
    #   Returns the specified array (Arr) with elements removed that contain only whitespace.

    my @r;      # Return buffer

    foreach (@_) {
        if (StrTrim($_) ne '') {
            push(@r, $_);
        }
    }

    return @r;

}


The Captian
Today they call you "crazy". Tomorrow they call you "ahead of your time."
Global Skywatch Learn about Chemtrails - You're breathing them now!
OnlyTheBestHerbs.com World-class supplements
Mercury Talk Why you are sick.
OneUp Domains Domains, Hosting, Email
1-800-358-4278 (U.S. & Canada)