I am new to this community, I tried to find relevant answers but could not find any.

My question is, I want to use perl script in a directory of files ending with .fasta, if I do in bash as

```
for i in *.fasta
do
perl script.pl
done

```

Question is: How can I use bash variable $i value in PERL script.
The perl script opens each file, perform certain functions on each file and closes it. like

```
my $file1 = 'All-Sequences.fasta'; # I want to replace 'All-Sequences.fasta' with $i
open (FILE, $file);
my @file = <FILE>;
close FILE;
print @file;

```

These are exemplary functions.