bahgarh has asked for the wisdom of the Perl Monks concerning the following question:

Hello Guys, I am very new to perl and need your help to create one program, i have file like database name is RAS1 /opt/hh/myfile pp@myservername1 submit id 112 undefined here i want to match two pattern one is server name and then submit id and if matches both , need to print a line below undefined, pls help me

Replies are listed 'Best First'.
Re: Pattern matching
by hdb (Monsignor) on Aug 31, 2013 at 07:57 UTC

    use strict; use warnings; my $string = "Some garbled question?"; print "$string Yes, it is!\n" if $string =~ /garbled/ && $string =~ /q +uestion/;