[ale] OT: Perl Question

Zhongbin Yu " <z.yu at premcall.com> Zhongbin Yu " <z.yu at premcall.com>
Fri Nov 12 12:52:05 EST 1999


I hit this when I tried to find RPMs to update: + is a reserved character
for reg expression.
what I did is do a replacement for + first before the reg exp match
Then, replace it back to ++ or whatever at your leisure.


Jerry Yu
----------------------------------------------------------------------------
Systems Engineer	| zyu at tc.net
Premiere Technologies	| 404-262-8544(O)	1-800-979-1105 (P)
Atlanta, GA 30326	| ae.tc.net/dept/engineering/op/public/developer/zyu

On Fri, 12 Nov 1999, Robert L. Harris wrote:

#
#
#Ok,
#  I'm writing a perl script that looks at files in specific directories.
#At one point, I'm trying to grep file names out of an array.  I'm 
#using:
#
#$Skip=grep(/$File/, at FileList);
#
#Yes, I do want a scalar returned.  At any rate, there is a point
#where $File="c++decl" and then I get this error:
#
#//usr/bin/c++decl/: nested *?+ in regexp at ./wanderblock.pl line 170.
#
#Anyone know a way around this?  Basically, all I need to know is if $File
#is in @FileList, not it's position or anything else.
#
#Robert
#
#---------------------------------------------------------------------------
#Robert L. Harris                |   "A person is smart;
#Senior System Engineer          |        People are dumb, panicky
#  R&D Consulting.               \_            dangerous animals"  - Agent K  
#
#
#http://www.rnd-consulting.com/~nomad
#
#DISCLAIMER:
#      These are MY OPINIONS ALONE.  I speak for no-one else.
#
#FYI:
# perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'
#






More information about the Ale mailing list