in reply to Runs from Command Line but NOT from Perl
--data-binary $'{"filing_status": ...'$'...' is a bashism: a feature of Bash_(Unix_shell) that POSIX does not require other shells to understand. Perl runs /bin/sh (the actual rules may be more complicated), which may not correspond to Bash (or may be Bash running in strict POSIX compliance mode), so the command fails.
Solution: use the ordinary single-quoted literal '{"filing_status": ...er_itemized": 0}' for the JSON string argument. But that would only help you to run the command from a POSIX-compliant shell; making your command compatible with both /bin/sh and CMD.EXE is more of an arcane art I'm not proficient at.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Runs from Command Line but NOT from Perl
by ikegami (Patriarch) on Oct 20, 2018 at 01:53 UTC |