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: Perl Programming Help: Beginner: Re: [Laurent_R] Match string in multi-line file: Edit Log



Stefanik
User

Dec 28, 2012, 12:18 AM


Views: 4349
Re: [Laurent_R] Match string in multi-line file

Ok it works :)

In my "test" script there was a wrong line...

Anyway, here the code as suggest from Laurent:


Code
     open (PARSEFILE, "<", $FileToParse) or die "No file!"; 
while ($FileTemp = <PARSEFILE>){
my ($field_1, $field_2) = split /:/, $FileTemp;
my ($cst1, $value1) = split /,/, $field_2 ;print "$value1\n";
}
close (PARSEFILE);



Many thanks.


(This post was edited by Stefanik on Dec 28, 2012, 12:22 AM)


Edit Log:
Post edited by Stefanik (User) on Dec 28, 2012, 12:20 AM
Post edited by Stefanik (User) on Dec 28, 2012, 12:20 AM
Post edited by Stefanik (User) on Dec 28, 2012, 12:22 AM


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

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