-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Beri-Veera-ext, Reddy (n.a.) wrote:
> Hi Please see my sample program.
> Error:Missing $ on loop variable at
> C:\BSH\Flexcax_export\samples\arry_arg.pl line 11.
> 
> 
> Thanks && Regards 
> Karunakar Reddy B.V. 
> 
> 

Firstly, the script you supplied doesn't run on it's own! Ensure you
have the following at the top of your script:

use strict;
use warnings;

They will force you to use good programming practice when it comes to
scope etc. You will then need to specify values for variables you pass
to your method.


The slightly modified version of your script produces no warnings like
the one you mentioned:

#!/usr/bin/perl
use strict;
use warnings;

my @dr_con_list = (1..10);
my $dataset = 1;
my $datasettype = 1;
my $release_status = 1;
my $item_id = 1;
my $item_revision = 1;
my $local_option = 1;

my $status =
&ug_convert([EMAIL 
PROTECTED],$dataset,$datasettype,$release_status,$item_id,$item_revision,$local_option);

sub ug_convert
{

my($local_con_list,$local_dataset,$local_datasettype,$local_release_status,$local_item_id,$local_item_rev,$local_option)
= @_;
  print "entered in to convertion form\n";

     my $first_element = $local_con_list->[0];
     print "$first_element\n";
     #print "the con count is $con_list_len\n";
     foreach my $element ( @{$local_con_list} )
     {print "$element\n";}
}
__END__


Changes I made:
1) added "use strict;" and "use warnings;" at the top of the script.
2) set the values of the method arguments to some value as you didn;t
supply any.
3) set scope of $status using "my"

Nath

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGsH/eh5z4PPfwHQoRAhSGAJwJENIBNImick3No/J2KBrIUUrsKACgioYE
N4lu+J1wTWWXqMJcJroF83U=
=Cipd
-----END PGP SIGNATURE-----
_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to