Serge Shakarian wrote:
<?XML:NAMESPACE PREFIX = O />

When parsing a large log file which one would be better for performance
splice or split? Every line is in a standard format and I would be using
splice/split to get 12 out of 20 space separeted words in each line. Thanks
in advance.
Serge


splice is used on arrays and split on scalars
so if your are using splice you will anyway be using split to create an array
Personally I think writing a regex ( probably a longish one with 20cols ) will give you best results because you are picking only few cols out of many


like ( take for eg just 5 cols and picking up 3 )

while(<LOG>){
    my($a,$b,$c) = (/^(.*?) (.*?) .*? (.*?) .*$/)
....
....
....


}



Just try it out and let me know Ram




-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to