This is a file that I need to convert into a excel spreadsheet and then create graphs based on some parameters, I used the text/csv module, but seems like its not there on my system.. so I am thinking in terms of using split for extracting the fields, the split is on comma.. (its a comma delimited file) somehow my script shows no output as in .. no new excel spreadsheet is created with the new data format.. can someone help me out?
these are the field names...

"Date","Time","RAS-Client","Record-Type","Full-Name","Auth-Type","User +-Name","NAS-IP-Address","NAS-Port","Service-Type","Framed-Protocol"," +Framed-IP-Address","Framed-IP-Netmask","Framed-Routing","Filter-ID"," +Framed-MTU","Framed-Compression","Login-IP-Host","Login-Service","Log +in-TCP-Port","Callback-Number","Callback-ID","Framed-Route","Framed-I +PX-Network","Class","Session-Timeout","Idle-Timeout","Termination-Act +ion","Called-Station-ID","Calling-Station-ID","NAS-Identifier","Proxy +-State","Acct-Status-Type","Acct-Delay-Time","Acct-Input-Octets","Acc +t-Output-Octets","Acct-Session-Id","Acct-Authentic","Acct-Session-Tim +e","Acct-Input-Packets","Acct-Output-Packets","Acct-Termination-Cause +","Acct-Multi-Session-Id","Acct-Link-Count","NAS-Port-Type","Port-Lim +it","Tunnel-Type","Tunnel-Medium-Type","Tunnel-Client-Endpoint","Tunn +el-Server-Endpoint","Acct-Tunnel-Connection","Tunnel-Private-Group-ID +","Tunnel-Assignment-ID","Acct-Tunnel-Packets-Lost","Acct-Input-Gigaw +ords","Acct-Output-Gigawords","Connect-Info","MS-Acct-Auth-Type","MS- +Acct-EAP-Type","Event-Timestamp","NAS-Port-ID","ACC-Err-Message","Ann +ex-Product-Name","Annex-SW-Version","Annex-System-Disc-Reason","Annex +-Modem-Disc-Reason","Annex-Disconnect-Reason","Annex-Transmit-Speed", +"Annex-Receive-Speed","Ascend-Modem-Port-Number","Ascend-Modem-Slot-N +umber","Ascend-Modem-Shelf-Number","Ascend-Xmit-Rate","Nautica-Acct-S +essionId","Nautica-Acct-Direction","Nautica-Acct-CauseProtocol","Naut +ica-Acct-CauseSource","Telebit-Accounting-Info","Last-Number-Dialed-O +ut","Last-Number-Dialed-In-DNIS","Last-Callers-Number-ANI","Channel", +"Event-Id","Event-Date-Time","Call-Start-Date-Time","Call-End-Date-Ti +me","Default-DTE-Data-Rate","Initial-Rx-Link-Data-Rate","Final-Rx-Lin +k-Data-Rate","Initial-Tx-Link-Data-Rate","Final-Tx-Link-Data-Rate","S +ync-Async-Mode","Originate-Answer-Mode","Modulation-Type","Equalizati +on-Type","Fallback-Enabled","Characters-Sent","Characters-Received"," +Blocks-Sent","Blocks-Received","Blocks-Resent","Retrains-Requested"," +Retrains-Granted","Line-Reversals","Number-Of-Characters-Lost","Numbe +r-of-Blers","Number-of-Link-Timeouts","Number-of-Fallbacks","Number-o +f-Upshifts","Number-of-Link-NAKs","Back-Channel-Data-Rate","Simplifie +d-MNP-Levels","Simplified-V42bis-Usage","PW_VPN_ID"
followed by the corresponding values... pls note not al fields have some value in it.. lots may go unfilled!!

"06/19/2006","22:42:15","DFWVPN02","Start","Unknown","Unknown","000110 +43@trop","172.21.0.7","1444270","8","1","172.21.16.23","255.255.224.0 +",,,,,,,,,,,,"ou=troppilot",,,,,,"DFWVPN02",,"1","2",,,"001609AE",,,, +,,,,"5",,"9",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,, "06/19/2006","22:42:11","DFWROAM02","Start","Unknown","Unknown","00011 +043@trop","204.136.66.102","257","2","1","66.90.226.138",,,,,,,,,,,,, +,,,,"9412380022",,"i-Pass VNAS",,"1",,"0","0","469917956",,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, "06/19/2006","22:36:06","DFWVPN01M.PBSG.PVT","Start","Unknown","Unknow +n","00013643","172.21.0.5","2042684","8","1","172.21.0.190","255.255. +224.0",,,,,,,,,,,,"ou=troppilot",,,,,,"DFWVPN01M.PBSG.PVT",,"1","1",, +,"001F2B3C",,,,,,,,"5",,"9",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,,,,,,, "06/19/2006","22:55:08","DFWVPN02","Start","Unknown","Unknown","000176 +74@trop","172.21.0.7","1444327","8","1","172.21.16.66","255.255.224.0 +",,,,,,,,,,,,"ou=troppilot",,,,,,"DFWVPN02",,"1","9",,,"001609E7",,,, +,,,,"5",,"9",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,, "06/19/2006","22:55:03","DFWROAM02","Start","Unknown","Unknown","00017 +674@trop","204.136.66.102","13569","2","1","66.2.65.33",,,,,,,,,,,,,, +,,,"6305220049",,"i-Pass VNAS",,"1",,"0","0","000029AA",,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

code and readmore tags by holli


In reply to Comma delimited file manipulation -- help required. by swetashah23

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.