Is HTTP an option? Commands, responses and error messages are already segregated — that's the hard part — so it easily achieve your goal using a small client driving a small CGI script.
Client:
my @files = do { my $list_response = $ua->get("$uri?action=list_files"); if (!$list_response->is_success()) { die(...); } split /\n/, $response->content() }; for my $file (@files) { my $esc_file = uri_escape($file); my $get_response = $ua->get( "$uri?action=get&file=$esc_file", ":content_file" => $file, ); if (!$get_response->is_success()) { unlink($file); warn(...); next; } my $move_response = $ua->post( "$uri?action=move&file=$esc_file", ); if (!$move_response->is_success()) { warn(...); next; } }
In reply to Re: Short example using IPC::Open2 or IPC::Open3
by ikegami
in thread Short example using IPC::Open2 or IPC::Open3
by Limbic~Region
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |