Hi everybody,

is there a better way to pass a value from a shell script rather than write to a file 
and have perl read the file.

In a shell script I can read the value as $1, how do I read it in perl. In C++ i can 
read the value using  argv[1] , how can I read this same value in perl, instead of 
having to have shell script pass it to perl in form of a file.

For example in C++  this program sorts out the problem. How can I write the equivalent 
in Perl.

#include <stdio.h>
#include <string.h>

int main (int argc, char *argv[])
{
if (argc<2)
 retun(-1)
else
{
if(!strcmp(argv[1],"25"))
return(-1);
else
return(0)
 }
}

All help will be appreciated.
Thanks in advance,
Ackim

Reply via email to