in reply to How can group these strings
If your intention was just to group this strings, then chomp in a perl one-liner could do the job.
Case (a):
this is equalvalent to:perl -pe "chomp;" text.txt
LINE: while (defined($_ = <ARGV>)) { chomp $_; } continue { die "-p destination: $!\n" unless print $_; }
perl -ne "chomp;print" text.txt
LINE: while (defined($_ = <ARGV>)) { chomp $_; print $_; }
|
|---|