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.
| |
How nice that it got resolved. Now would you please share your solution, and question, with us?
| [reply] |
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.
| [reply] [d/l] |
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. | [reply] [d/l] [select] |