The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

I know I'm missing something stupid. Perl help by JustnCase 2004-04-12 11:58:52
I am receiving files from our illustrious lan team that are supposedly CSV files. Unfortunately they dont have quotes around text (as specially text containing commas!) I am writing a program to fix this problem.

My Problem:

I have extracted each of the sections delimited by commas, there are six fields and I used this statement :
($f1,$f2,$f3,$f4,$f5,$f6) = $_ =~ m/(^.*,)(.*,)(.*,)(.*,)(.*,)(.*)/;
now how do I determine if $f6 has valid data? It should be null if there are not 5 commas correct? Yes I know it's probably amazingly simple but I can't figure it out. :(
[ Reply ]
  To see if a variable is filled, just check it. by aix tom2004-04-12 13:11:42
    well heck! Why didn't I think of that? by JustnCase2004-04-12 13:21:38
      Becareful by version0.12004-04-12 13:25:56
        Thanks by JustnCase2004-04-12 13:35:59

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)