in reply to Re^5: Query Does not work in Spreadsheet::WriteExcel
in thread Query Does not work in Spreadsheet::WriteExcel

Did you use double quotes in Perl to store the sql query?

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^7: Query Does not work in Spreadsheet::WriteExcel
by dirtdog (Monk) on Jul 24, 2020 at 21:03 UTC

    No. I did not use any quotes to store the query.

      How then did you generate the query string in Perl? Did you use a here-doc? Some variations of here-doc handle escapes (and interpolation).

      I think the point choroba is making is that a double-quote string constructor processes escapes (and also interpolates):

      c:\@Work\Perl\monks>perl -wMstrict -le "my $sq = '\Quick and \Easy \Upper \Limit \\UTTER \\LAUGH \Wow'; print qq{>$sq<}; " >\Quick and \Easy \Upper \Limit \UTTER \LAUGH \Wow< c:\@Work\Perl\monks>perl -wMstrict -le "my $dq = qq{\Quick and \Easy \Upper \Limit \\UTTER \\LAUGH \Wow}; print qq{>$dq<}; " Unrecognized escape \W passed through at -e line 1. >uick\ and\ asy PPER imit \utter \laugh wow<
      (Do you have warnings enabled?)


      Give a man a fish:  <%-{-{-{-<