Preprocessor in Perl?

2008-06-05 Thread adarsh.s85
Hello, I have this situation wherein I have to run a perl script over pre-processed files. Eg: File "A.cfg" needs to be preprocessed to say "A" and then my perl script works on it. This preprocessing is done, as of now, by command line call of " gcc -E A.cfg > A" and then a command to run the per

RE: problem using backslash on brackets in regular expressions

2008-04-22 Thread adarsh.s85
Hello, (snip) I am trying to use the s/// operator to remove it, by doing this: while() { $_ =~ s/\[*\]//; $_ =~ s/\(*\)//; print $_; } (snip) The method used is incorrect. $_ =~ s/\[*\]//; ---> This says that the search is for opening parenthesis (zero or more occurre