in reply to Using a variable for PATHNAME in exec()

Better post your code, but put the command you want in a qw, and try something like:
exec qw(perl -w "c:\\examples\\perl\\a.pl");