I have a Perl script `progA.pl` which needs to run another Perl script `progB.pl` using the `system` command. However, `progB.pl` has been aliased in `~/.bashrc` so I need to ensure that it is run after `~/.bashrc` has been loaded. I can achieve this by using `bash` with the `-lc` option.

For this question, I simplify the problem as much as I think is needed, by considering the following version of `progB.pl` 

```
use feature qw(say);
use strict;
use warnings;
use Data::Dump qw(dd dump);

say "Received \@ARGV: " . dump @ARGV;

```

and here is `progA.pl`:

```
use feature qw(say);
use strict;
use warnings;

use Data::Dump qw(dd dump);

my $cmd = qq(progB.pl --opt='This option contains '"'"'single'"'"' quotes');
say "cmd = " . dump($cmd);
system( "$cmd" );
say "-----";
system( 'bash -c ' . "$cmd" );
say "-----";
system( 'bash -c ' . "'$cmd'" );
say "-----";
system( "bash -c  \"$cmd\"" );

```

Running 

```
$ progA.pl

```

gives output:

```
cmd = "progB.pl --opt='This option contains '\"'\"'single'\"'\"' quotes'"   
Received @ARGV: "--opt=This option contains 'single' quotes"  
-----   
Received @ARGV: ()  
-----   
Received @ARGV: "--opt=This"  
-----   
Received @ARGV: "--opt=This option contains single quotes"

```

We see that this works fine, when `progB.pl` is run directly without using `bash -c`. When I use `bash -c` to run the command, none of the three alternatives are working correctly.

How can I run `progB.pl` with an argument containing single quotes and at the same time using using `bash -c` ?