Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: $/ usage

by 7stud (Deacon)
on Jan 03, 2013 at 02:08 UTC ( [id://1011383]=note: print w/replies, xml ) Need Help??

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
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1011383]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-03-19 04:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found