I want to do this in a shell script:
#!/usr/bin/ksh
PERL_PATH=/usr/local/bin/perl
RET1=$(${PERL_PATH} missing_months_wrap.pl)
echo $RET1
How do i do it?
calling the perl script as above is giving me an error:
> shell.sh
Can't return outside a subroutine at missing_months_wrap.pl line 269.
EDIT: inside the perl script the statements are :
unless (@pm1_CS_missing_months)
{
$SETFLAG=1;
}
my @tmp_field_validation = `sqlplus -s $connstr \@DLfields_validation.sql`;
unless (@tmp_field_validation)
{
$SETFLAG=1;
}
if ($SETFLAG==1)
{
return $SETFLAG;
}