[Chicago-talk] Capturing OS command output.

Steven Lembark lembark at wrkhors.com
Tue Jul 5 21:04:00 PDT 2005



-- Richard Reina <richard at rushlogistics.com>

>
> Does anyone know how can I get the scalar to give me
> the path of the convert command?
>
> my $convert_path = system("which convert");

    use Fatal qw( open );

    my @result =
    eval
    {
        open my $fh, "$command |";

        <$fh>
    };

    die if $@;


or

    my @result = qx( $command );


>
> just gives me the success or fail results.
>
> Thanks,
> Richard
>
> A people that values its privileges above its principles soon loses both.
>  -Dwight D. Eisenhower.
> _______________________________________________
> Chicago-talk mailing list
> Chicago-talk at pm.org
> http://mail.pm.org/mailman/listinfo/chicago-talk



-- 
Steven Lembark                                       85-09 90th Street
Workhorse Computing                                Woodhaven, NY 11421
lembark at wrkhors.com                                     1 888 359 3508


More information about the Chicago-talk mailing list