rajeshatbuzz has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's minimum standard of quality and will not be displayed.

Replies are listed 'Best First'.
Re: removing Extra lines issues in arrays
by locked_user sundialsvc4 (Abbot) on Jan 11, 2012 at 15:38 UTC

    When you make a thread, please describe the problem in the thread as best you can (perhaps editing the OP so that it remains fresh, but clearly noting your edits).   Then, when the problem is solved, edit the title to say, “SOLVED.”   But please don’t obliterate that content because, perhaps for many years to come, people are going to search and they’re going to find your thread ... and you want to give them the ability to quickly determine if the solved-problem matches their problem, and then to quickly reckon how it was understood and solved.   (If the thread dives down to great depth, post a summary at the top level for those of us who don’t want to don our SCUBA tanks.)   When you post a thread here, you are writing for the present and for the future.

Re: removing Extra lines issues in arrays
by Anonymous Monk on Jan 11, 2012 at 11:44 UTC

    How nice that it got resolved. Now would you please share your solution, and question, with us?

      Hi All, Sorry, guess my question was not updated but reply.. The problem is:
      my @list = qx(p4 -p $P4PORT groups); foreach my $group ( @list ) { ---------- ---------
      in this $group is returning correct value but with extra blank line. The issues is still there but trying to find a solution.

        Perhaps something like...

        my @list = grep { length } map { chomp } qx(p4 -p $P4PORT groups);

        The map {chomp} part applies chomp to each item in the list (which strips trailing line break characters).

        The grep {length} part then filters out any zero-length strings.