I don't run the code myself, but..... On Tue, 17 Mar 1998, Curtis Villamizar wrote:
Index: src/syntax.pl =================================================================== RCS file: /usr/local/CVS-routing-dev/irr-source/dbase/src/syntax.pl,v retrieving revision 2.4 diff -c -r2.4 syntax.pl *** syntax.pl 1997/11/14 20:49:12 2.4 --- syntax.pl 1998/03/17 19:59:25 *************** *** 490,501 **** # # Now check the actual keywords # ! while($tmppol =~ s/(\S+)//) { ! if (!&isaskeyword($1)) { ! return $O_ERROR, ! "syntax error in \"$ATTL{$key}: peer $as cost $pref\"\n\t$1 ". ! ! "is not a routing policy KEYWORD"; } } return $O_OK; --- 490,501 ---- # # Now check the actual keywords # ! local($tmpword); ! foreach $tmpword ( split("\\s+", "$tmppol") ) { ! if (!&isaskeyword($tmpword)) { ! return $O_ERROR, ! "syntax error in \"$ATTL{$key}: peer $as cost $pref\"\n". ! \t$tmpword is not a routing policy KEYWORD";
Aren't you missing a " in the beginning here?
} } return $O_OK;
Also, wouldn't this use of split by ever so slightly faster? : split(/\s+/, $tmppol) Sorry, I always use / instead of ' here, but I was mostly referring to wrapping $tmppol. Just a thought. I guess it's hard to measure :-) -- Robert Martin-Leghne (RM59), Network Manager, DKnet (AS2109), Denmark main(){int a[2],b[2];pipe(a);pipe(b);if(fork()){dup2(a[0],0);dup2(b[1],1) ;}else{dup2(b[0],0);dup2(a[1],1);write(1,"R",1);}execlp("cat","cat",0);}