in reply to Re^2: An optimal way to induce CRLF using perlio
in thread An optimal way to induce CRLF using perlio

Shell escapes are weak sauce, use system, use Capture::Tiny
use Capture::Tiny qw/ capture /; my($stdout, $stderr, $exit) = capture { system '.../curl', ...',"\r\n\r\n..."; };;

Replies are listed 'Best First'.
Re^4: An optimal way to induce CRLF using perlio
by perlron (Pilgrim) on Oct 27, 2014 at 01:21 UTC
    using system to execute the curl command was giving me the 2nd issue i spoke of.(malformed headers) . Luckily the post i mentioned advised back ticks which makes it work.
    will read about the other Capture::Tiny thing..Ok. thanks
    Do not wait to strike when the iron is hot! Make it hot by striking - WB Yeats

      using system to execute the curl command was giving me the 2nd issue i spoke of.(malformed headers) . Luckily the post i mentioned advised back ticks which makes it work. will read about the other Capture::Tiny thing..Ok. thanks

      Um, `` aka qx// goes through the shell -- you don't want to go through the shell (its shell programming), you have to quote and escape characters, and you aren't doing it correctly ( String::ShellQuote)

      system, the list form I gave, does not go through the shell, so you don't need shell escapes

      Yes, you can give curl nonsense using both of these, the shell (qx) and directly(system) ... stick with system so you only have to deal with perl string escape/quoting rules