in reply to Re^2: Test RegEx
in thread Test RegEx

You can't (try to) use / as the regex delimiter and (an unquoted) / within the regular expression. Use a different regex delimiter, for example !:

... if (@RECORD = grep (m!^\s*password\s+requisite\s+(/lib/security/$ISA/) +?pam_cracklib.*lcredit=([0123456789-]+!, @fRecords )) { ...

Also see perlop on m//

Replies are listed 'Best First'.
Re^4: Test RegEx
by Saved (Beadle) on Apr 08, 2010 at 18:37 UTC
    Error resolved, thanx. Now I just need to get on top of RegEx's
      One thing that might help, depending on which version of perl you are using, is the 'qr' operator. It works similar to qq or qw, except it works on regular expressions, which is very handy for using RegExs as variables passed in from a function or main arg.

      Hope that helps.
Re^4: Test RegEx
by Saved (Beadle) on Apr 08, 2010 at 18:27 UTC
    Thanx, that's likely the problem. I'll try to work throgh with that.