04-25-2017
Now I understand. Everything what is left, to figure out, how to make it works in Perl
Thanks for contribution
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i want to call a oracle function in my shell script (4 Replies)
Discussion started by: dineshr85
4 Replies
2. Shell Programming and Scripting
i have a function written in one shell script and i want to call that function in another shell script and use the value returned by that script.
can any one suggest me how can i do that?
regards,
Rajesh.P (4 Replies)
Discussion started by: rajesh.P
4 Replies
3. Shell Programming and Scripting
Here is the following code :
1.
# gcc -c test firstprog.c
the above command will generate a executable file called "test " in which ever directory it is run.
Assuming It will also return a value.
2. In the below SCRIPT . test is a file generated by compiling a c program... (3 Replies)
Discussion started by: Vabiosis
3 Replies
4. Red Hat
please help me in this script
shell script :1
***********
>cat file1.sh
#!/bin/bash
echo "this is first file"
function var()
{
a=10
b=11
}
function var_1()
{
c=12
d=13 (2 Replies)
Discussion started by: ponmuthu
2 Replies
5. Shell Programming and Scripting
hi everyone
i am trying to do this
bash> cat abc.sh
deepak()
{
echo Deepak
}
deepak
bash>./abc.sh
Deepak
so it is giving me write simply i created a func and it worked
now i modified it like this way
bash> cat abc.sh (2 Replies)
Discussion started by: aishsimplesweet
2 Replies
6. Shell Programming and Scripting
I've 2 shell scripts viz., CmnFuncs.ksh and myScript.ksh.
1st script contains all common functions and its code is as below:
$vi CmnFuncs.ksh
#!/bin/ksh
RunDate()
{
....
....
export Rundt=`date +%Y%m%d`
}
2nd script is invoking the above one and I expect to use the RunDt variable... (8 Replies)
Discussion started by: njny
8 Replies
7. Shell Programming and Scripting
I am getting Segmentation fault at below function call in my script:
get_x() {
sqlplus -s / <<end | grep KEEP | sed 's/KEEP//;s///g'
select 'KEEP' ,table_name from all_synonyms where upper(synonym_name)= '$1';
exit
end
x=$(get_x $1)
echo " SQL OUTPUT IS :: $x"
}
I am getting output of... (1 Reply)
Discussion started by: IB_88
1 Replies
8. Shell Programming and Scripting
Dear All,
I want to know how can i call oracle function from shell script code . My oracle function have around 5 input parameters and one return value.
for name in *.csv;
do
echo "connecting to DB and start processing '$name' file at "
echo "csv file name=$x"
sqlplus -s scoot/tiger <!... (2 Replies)
Discussion started by: Balraj
2 Replies
9. Programming
Hi, I am complete new to C programming and shell scripting. I just wrote a simple C code to calculate integral using trapezoid rule. I am prompting user to pass me No. of equally spaced points , N , upper and lower limit. My code looks as follows so far:
#include<stdio.h>
#include<string.h>... (2 Replies)
Discussion started by: bjhjh
2 Replies
10. Shell Programming and Scripting
In one of my shell function I found the following
set_default_values () {
prog=$1
PROC_DT=$2
RESET_ALL="${3-N}"
#echo "Processing date as passed = , Program name = "
......
I understand the first and second arguments, but don't understand... (1 Reply)
Discussion started by: digioleg54
1 Replies
LEARN ABOUT CENTOS
perl::critic::policy::modules::requireexplicitpackage
Perl::Critic::Policy::Modules::RequireExplicitPackage(3)User Contributed Perl DocumentatioPerl::Critic::Policy::Modules::RequireExplicitPackage(3)
NAME
Perl::Critic::Policy::Modules::RequireExplicitPackage - Always make the "package" explicit.
AFFILIATION
This Policy is part of the core Perl::Critic distribution.
DESCRIPTION
In general, the first statement of any Perl module or library should be a "package" statement. Otherwise, all the code that comes before
the "package" statement is getting executed in the caller's package, and you have no idea who that is. Good encapsulation and common
decency require your module to keep its innards to itself.
There are some valid reasons for not having a "package" statement at all. But make sure you understand them before assuming that you
should do it too.
The maximum number of violations per document for this policy defaults to 1.
CONFIGURATION
As for programs, most people understand that the default package is "main", so this Policy doesn't apply to files that begin with a perl
shebang. If you want to require an explicit "package" declaration in all files, including programs, then add the following to your
.perlcriticrc file
[Modules::RequireExplicitPackage]
exempt_scripts = 0
Some users may find it desirable to exempt the load of specific modules from this policy. For example, Perl does not support Unicode module
names because of portability problems. Users who are not concerned about this and intend to use "UTF-8" module names will need to specify
"use utf8;" before the package declaration. To do this, add the following to your .perlcriticrc file
[Modules::RequireExplicitPackage]
allow_import_of = utf8
The "allow_import_of" configuration option takes multiple module names, separated by spaces.
IMPORTANT CHANGES
This policy was formerly called "ProhibitUnpackagedCode" which sounded a bit odd. If you get lots of "Cannot load policy module" errors,
then you probably need to change "ProhibitUnpackagedCode" to "RequireExplicitPackage" in your .perlcriticrc file.
AUTHOR
Jeffrey Ryan Thalhammer <jeff@imaginative-software.com>
COPYRIGHT
Copyright (c) 2005-2011 Imaginative Software Systems. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license
can be found in the LICENSE file included with this module.
perl v5.16.3 2014-06-09 Perl::Critic::Policy::Modules::RequireExplicitPackage(3)