Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Perl query

14 views
Skip to first unread message

Rajini Naidu

unread,
Jun 5, 2009, 1:58:22 PM6/5/09
to perl-t...@perl.org
Hi,
 
This is my code in perl.
 
   my $include = "foo.1";
 my $ct = "/usr/atria/bin/cleartool";
 
open my $pipe, "-|", $ct, "desc", $include or die "could not run cleartool: $!";
 
When i execute this , I am getting below error.
 
   meaningless input.
 
    Uncaught exception from user code:
        Illegal division by zero.
 
Is there any other way to represent below code in perl,
 
open my $pipe, "-|", $ct, "desc", $include or die "could not run cleartool: $!";
 
Am i missing anything here. Please advise.
 

Michael Running Wolf

unread,
Jun 5, 2009, 3:52:26 PM6/5/09
to Rajini Naidu, perl-t...@perl.org

On Jun 5, 2009, at 10:58 AM, Rajini Naidu wrote:

> Hi,
>
> This is my code in perl.
>
> my $include = "foo.1";
> my $ct = "/usr/atria/bin/cleartool";

Try:

my $command = "$ct desc $include";
open my $pipe, '-|', $command or die "...";

You may be running into machine-dependent behavior of the LIST form of
open (see perldoc -f open).

Just an idea. I haven't thought deeply about what the error message
may mean.

--
Please take note of the changes:
Old: Michael Running Wolf <MichaelRu...@att.net
New: Michael R. Wolf <Michae...@att.net


Johan Vromans

unread,
Jun 8, 2009, 7:32:31 AM6/8/09
to perl-t...@perl.org
Rajini Naidu <rajin...@gmail.com> writes:

> Am i missing anything here. Please advise.

It often helps to specify:

- perl version
- system you're running on
- complete source

(If your source was complete, you're missing

use strict;
use warnings;

in front of your program.)

-- Johan

0 new messages