01 December 2010

ni koding perl..aku wat 4 extract data yg bejuta..xkan le nak extract 1-1 lak kan; smpi ble nak abes..
so ni kire pling simple punye sistem;leh la aku duk lepak, gi toilet @ isap okok ke..kje aku sistem yg wat'n..keke


#start code

#!/usr/bin/perl


open (textfile,"maxON-20101201.txt");
open (MYFILE, '>result.txt');


while (<textfile>)
{


($time, $app, $mo, $sm, $subid, $sc, $st, $mot, $moid, $tt, $l, $ctnt)= split(/,/);


if(($sc =~ /22919$/) && ($ctnt =~ /match on$/i))
{
($short, $code)  = split(/\=/,$sc);
($con, $tent)  = split(/\=/,$ctnt);

print (MYFILE $code.","." ". $tent);
#print $_;


}
}

#end code

0 comments: