Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: storing queries in an array and execute

by choroba (Cardinal)
on Nov 25, 2016 at 09:41 UTC ( [id://1176529]=note: print w/replies, xml ) Need Help??


in reply to storing queries in an array and execute

Update: Sorry, I misread the question. Just remove the `qx`, it tries to run Dumper through the shell.
use Data::Dumper; $out = Dumper($q);

Old and wrong answer: It seems you're calling the script as a shell script. Either, call it with perl :

perl myscript.pl

or prepend the shebang line to the top of the script to tell your system what interpreter to use:

#!/usr/bin/perl

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Replies are listed 'Best First'.
Re^2: storing queries in an array and execute
by kaka_2 (Sexton) on Nov 25, 2016 at 09:59 UTC
    if i remove the qx then it is just printing the queries whereas i want to execute These queries.
      Ah, then keep the qx and remove the Dumper.

      But you should use DBI with DBD::mysql instead of shelling out.

      ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

        if i remove Dumper then also it gives error and that i why i thougt to use Dumper.

        with DBI, i have Problem with missing Module DBD and that i why i am trying out directly with mysql -e.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1176529]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2024-04-18 08:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found