I'm trying to pass a variable to a custom Perl script.
$file="my_wa/fin"
if [[ "$file" == *"fin" ]]; then
script.pl
fi
In my script I try to use $file as my path to open and read a file
my $input_filename = "$ENV{file}";
I understand that I need to export it somehow and receive it in my Perl code,
but it doesn't recognize $file. - it works perfectly if I just write my_wa/fin.