Help for this page

Select Code to Download


  1. or download this
    1) perl -nle '$result .= " $_"; END{print $result}' data.txt
    
    2) perl -e "chomp(@lines=<>); print join ' ', @lines" data.txt
    
  2. or download this
    perl -e 'undef $/;  $text=<>; $text =~ tr/\n//; 1 while $text =~ s/\b(
    +\w+\d+\s*\d+\.\d+\.\d+\.\d+)\s*\1\b/$1/ig; print $text; $/="\n"; list
    
  3. or download this
    use strict;
    use warnings;
    ...
    --output:--
    S55 1.1.1.1 S66 2.2.2.2 S55 1.1.1.1
    
  4. or download this
    perl -nle '$results{$_}=undef; END{print join " ", keys %results}' dat
    +a.txt