my $command = "/opt/local/bin/convert foo.jpg -crop ${w}x$h+$x+$x ./cropped/foo.jpg"; my $result = `$command`; say qq|{"result":"$result"}|;