[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: The "Right Way" (TM) to run external program out of gtk2-perl app?



Am Dienstag 30 August 2005 19:38 schrieb A. Pagaltzis:

[ muppets code ]

> Of course it would still be better if muppet could get into the
> habit of using three-argument open() with lexical filehandles.
>
> :-)
>
>     sub run_convert {
>         my @cmd = @_;
>
>         my $main_loop = Glib::MainLoop->new;
>
>         my $pid = open my $child, '-|', @cmd
>             or die "can't fork convert: $!";

Just FYI:

On Windows XP (ActiveState / 5.8.0), the usage of @cmd causes a "List form of 
pipe open not implemented" error. Using

my $pid = open my $child, '-|', $cmd
             or die "can't fork convert: $!";

instead works fine, but filenames (containing blanks) must now be quoted.

Stephan




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]