[Israel.pm] Reg: system & for loop

Mikhael Goikhman migo at homemail.com
Mon Sep 22 12:03:00 PDT 2003


On 22 Sep 2003 22:37:03 +0530, Durai wrote:
> 
> Here is my problem. I just create the C files & compile that file using
> system command. When the error occurs like "too large", It has come out
> from the loop. But When the error occurs, It just display the error and
> loop is going in the endless loop. How can I resole this one?
> 
>  system("cc -o test test.c");
>   if( /too/ )

my $output = `cc -o test test.c 2>&1`;
if ($output =~ /too/)

Regards,
Mikhael.



More information about the Perl mailing list