pop @array; #pop removes the last item of an array #### chomp foreach( @array ); # the foreach loop 'remembers' the value #### chomp foreach( @array ); @array = grep { length } @array; #grep leaves out all items that have a 'false' length