How to pass parameter to a perl file (say myperl.pl) from a shell file (say work.sh ) ? and how to get that parameter in perl file ? { is using my $var = @_ }.
How to pass parameter to a perl file (say myperl.pl) from a shell file (say work.sh ) ? and how to get that parameter in perl file ? { is using my $var = @_ }.
Thanks,
Pawan Kumar
Don't know if I understood the question ... you want to invoke a perl prog (say perl.pl) from a shell script (say work.sh) and a pass a var from the shell script to the perl program?
arne, You correctly got the question. I was missing perl before myperl.pl. Since in my case, .sh file will pass paramenter at every 5 minute (Automated script), I feel first method ( of arne) is more relevent ( every time just pass the parameter as argument). thank you.
jkr, from your answer, I learned a new way of doing the same thing in a different way. thanks.
If the word perl in front of your command line does the trick, you probably do not have a "she-bang" line in your perl script.
If the first line of your perl script is
Expand|Select|Wrap|Line Numbers
#!<path>/perl
where <path> is the path to your perl interpreter, and if the script is executable (chmod +x <script>), you do not need to put the word perl in front of your command line. You can call the script directly, instead.
Thanks in advance for any help. I'm looking for a way to pass data
from php to perl. Basically, I want to take some dynamic data from a
database, mixed with user input, then reformat it to make a...
Hi there,
I just installed Perl (v. 5.6.1. built for MSWin32 from ActiveState)
on a new server Windows 2000.
Amazingly the passing of arguments doesn't work !
I saved the following code in a...
I am trying to write a Perlscript to be used with some HTML pages. Here is
how it works:
1.. The first HTML page has a form which requests for user input. Then it
passes the QUERY_STRING...
In document "A.html" I have defined a function and within the document
body have included an IFRAME element who's source is document "B.html".
In document "B.html" I am trying to call the function...
The code below worked in VS 2003 & dotnet framework 1.1 but now in VS 2005
the pmID is evaluated to "" instead of what the value is set to:
....
xmlItems.Document = pmXML
// Add the pmID...
Hi everyone,
I have a perl script that opens an Access mdb thus:
system("C:\\Documents\ and\ Settings\\asearle\\My\ Documents\\iwh_dev\\MyAccessDB.mdb");
This works absolutely fine and,...
In this article, i explain how the use of bit masks is a hack in many
imperative languages.
Often, a function will need to take many True/False parameters. For
example, suppose i have a function...
Dear Friends,
I have a perl script abc.pl.I will be running this script with an parameter .The same parameter value i would like to pass to the shell script (The shell script is inside perl...
hello everyone..... i am ajay and i am new to php. in my project i have an option to invoke a bat file by passing parrameters and to diplay the result.
i tried this code but my page got hung or...
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...