$s = s/'/'\\''/g; [download]
$s =~ s/'/'\\''/g; [download]
Fixed in original code. Tested.
In reply to Re^4: perl -e in ssh by ikegami in thread perl -e in ssh by Anonymous Monk