I have a perl script that it opens many files and search for particular string what I need is to match if any string matched then go to the next file, here part of the script

I want to match one of the following:

```
function xyz () {

```

or

```
function xyz ()
{

```

or

```
xyz () {

```

or

```
{

```

or 
function abc\_xyz\_abc () {
or 
function abc\_xyz\_abc () 
{
or 
function ab\_cd\_ef () {
or 
abc\_xyz () {
or 
abc\_xyz () 
{

Here is some of my code:

```
if (( $match =~ m/function/)|| ($match =~ /()/)  || ($match =~ m/\W+\/())  .......{
   print "Matched: File $line\n";
   next;
} else {
   print "Not found\n";
}

```