
vikas.deep
User
May 28, 2009, 9:04 AM
Views: 7410
|
|
Re: [1arryb] Help Needed for Pattern Matchin for Variable Seperator.
|
|
|
Larry I simply can't understand what is happening over here. As I have said that if one desires to solve the problem using regular expression then it can't be a general one and every time one will have to design a new one. I solved the case for some malloc(x) something and not for for(x=1; x<foo;x++) { for( x=1; x<foo;x++ ) { for( x = 1 ; x < foo; x ++ ) { if ( x == 3 ) { where it (regex) will fail obviously. Then alex stepped in and it seems he created a new problem (Even after he explained from his side I lack a proper understanding) my $str = 'x=1.x.x=xxx+(x)x'; and devised a solution to that problem(which he devised) That solution again cannot be applied to the original and when I tried that (alex's solution) on the original malloc problem or your test data my computer says C:\ActivePerl>perl larr.pl Use of uninitialized value $str in substitution (s///) at larr.pl line 8, <$FH> line 1. Use of uninitialized value $str in concatenation (.) or string at larr.pl line 9, <$FH> line 1. and then you put that (alex's)solution to a long list of test data how come you never got this error C:\ActivePerl>perl larr.pl Use of uninitialized value $str in substitution (s///) at larr.pl line 8, <$FH> line 1. Use of uninitialized value $str in concatenation (.) or string at larr.pl line 9, <$FH> line 1. Alex's solution applies only to the case which he imagined/ mentioned in his post something like my $str = 'x=1.x.x=xxx+(x)x'; I am a beginner in perl and I am not able to understand what is happening over here. Why do I get a feeling that two grown-ups and/or more experienced persons over here are talking/discussing some serious matter even though all of it was how to sustitute "tainted" in some malloc(x) thing Kindly explain a bit -For all my suggestions " I am sure someone else can do it in a better or elegant manner!"
(This post was edited by vikas.deep on May 28, 2009, 9:10 AM)
|