Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Perl solution

by apotheon (Deacon)
on Jan 28, 2008 at 03:21 UTC ( #664616=note: print w/ replies, xml ) Need Help??


in reply to Re: Perl solution
in thread Perl solution

a tab delimited csv file

I think you mean "a tsv file". A csv file is, by definition, comma delimited. A better version would probably be something like this:

netstat -e | perl -ple 's/\s\s+/,/' > file.csv

. . . and, of course, neither of our versions are exactly perfect/complete.

print substr("Just another Perl hacker", 0, -2);
- apotheon
CopyWrite Chad Perrin


Comment on Re^2: Perl solution
Download Code
Re^3: Perl solution
by robot_tourist (Hermit) on Jan 28, 2008 at 15:49 UTC

    You are certainly not wrong, but it could be argued that csv became a 'backronym' of Character Separated Values.

    How can you feel when you're made of steel? I am made of steel. I am the Robot Tourist.
    Robot Tourist, by Ten Benson

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2014-09-20 01:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (151 votes), past polls