RE: about eval and stdin

2006-01-03 Thread Timothy Johnson
text to replace it with. PATTERN: Te([^ ]+).*support REPLACEMENT: sticular Pattern Found! $_ => Tech Support $1 => ch Type "s" to confirm substitution, or press any other key to cancel: s COMMAND: s/Te([^ ]+

RE: about eval and stdin

2006-01-03 Thread Timothy Johnson
I think when you include the parentheses in your pattern $1 is being set to the value inside the partentheses. It's as if you typed: if(/(dir)ectory/gi) which will set $1 to 'dir', which is probably not what you want. I think you can avoid this if you change the line to: if(/($pat

Re: about eval and stdin

2006-01-02 Thread John Doe
Adriano Allora am Montag, 2. Januar 2006 12.48: > hi to all, > a friend of mine ask me for a perl script to change regexp patterns in > some texts (he can learn regexp, but I suppose he won't learn perl). So > I start write this one to him. > I have a problem: > ==> with pattern = (dir)ectory and r