On Apr 1, 2008, at 12:00 PM, Frank Wiles wrote:
> On Mon, 31 Mar 2008 20:34:58 -0500
> "Emmanuel Mejias" <[EMAIL PROTECTED]> wrote:
>
>> I think I figured it out. How's that look, better?
>>
>> #!/usr/bin/perl -w
>>
>> @input = `cat /etc/syslog.conf`;
>>
>> foreach $line (@input) {
>> if ($line =~* /\var\/log/*){
>> print $line;
>> }
>> }
>>
>
> The asterisks there aren't correct. It should be like this:
>
> if( $line =~ /\/var\/log\// ) {
> print $line;
> }
I was thinking since one of the lines in syslog.conf had a -prepended.
So:
if($line =~ /.*\/var\/log\//) {
print $line;
}
_______________________________________________
kc mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/kc