CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Need a Custom or Prewritten Perl Program?: I need a program that...: Re: [FishMonger] Generate a C file from CSV file using perl: Edit Log



Zhris
Enthusiast

Jul 2, 2014, 12:44 PM


Views: 50754
Re: [FishMonger] Generate a C file from CSV file using perl

Just to put code to your alternative suggestion (I have never used a do until before):


Code
my $header; 
do { $header = <DATA>; } until( $header !~ /^(\s*$|#)/ );
my @headers = split /\s*,\s*/, $header;


Chris


(This post was edited by Zhris on Jul 2, 2014, 12:47 PM)


Edit Log:
Post edited by Zhris (Enthusiast) on Jul 2, 2014, 12:45 PM
Post edited by Zhris (Enthusiast) on Jul 2, 2014, 12:47 PM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives