in reply to processing PSQL with system command
system("su - admin -c \"$PSQL\"");
You have multiply nested double quotes. Don't even try to do that.
system("su - admin -c '$PSQL'");
I am trying to execute a psql command via the system command within perl
Why? There's DBD::Pg so you don't have to do horrible stuff like that.
🦛
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: processing PSQL with system command
by g_speran (Scribe) on Mar 30, 2022 at 14:17 UTC | |
by NetWallah (Canon) on Mar 31, 2022 at 05:01 UTC | |
by hippo (Archbishop) on Mar 30, 2022 at 14:34 UTC | |
by g_speran (Scribe) on Mar 30, 2022 at 15:47 UTC | |
by Fletch (Bishop) on Mar 30, 2022 at 14:52 UTC | |
by cavac (Prior) on Mar 31, 2022 at 12:23 UTC | |
by Anonymous Monk on Mar 30, 2022 at 18:12 UTC |