That's really easy as long as the array is the /only/ thing you want to pass.
my @array = qw(one two three four five);
printarray (@array);
sub printarray
{
print "@_"; # parameter list passed as built-in array @_
}
If, however, you need to pass the array together with other parameters and be
able to process them separately within the subroutine then you need to pass
array references. Let us know if you need anything more before we take this
leap.
Cheers,
Rob
> -----Original Message-----
> From: Sutapalli, eswara [mailto:[EMAIL PROTECTED]]
> Sent: 06 September 2001 07:26
> To: 'nafiseh saberi '; '[EMAIL PROTECTED] '
> Subject: Reg passing arguements
>
>
> Hi,
>
> please let me know how to pass an array from a C program
> to perl script as an arguement.
>
> Eg: I've an array with five elements, I need to call
> a perl script to print these values.
>
> thanx in advance,
> eswar
>
> WARNING: The information in this message is confidential and may be legally
> privileged. It is intended solely for the addressee. Access to this message
> by anyone else is unauthorised. If you are not the intended recipient, any
> disclosure, copying, or distribution of the message, or any action or
> omission taken by you in reliance on it, is prohibited and may be unlawful.
> Please immediately contact the sender if you have received this message in
> error. Thank you.----------------- HCL Perot Systems
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]