01-30-2006
Query string assingment for other variable in PERL
Hi friends,
I want to use query string value to another variable but it gives following error when I use it with print out command,
Insecure dependency in open while running with -T switch at C:/Program Files/Apache Group/Apache2/cgi-bin/cdr_findere.pl line 119.
My code as follows,
my $PNumber = param ('PNo') ;
my $logfile = $PNumbe ;
open(OUT, ">$logfile.txt") or &dienice("Couldn't open
output file: $!");
print out "This is a test line" ;
foreach my $i (@query_calltype)
{
print OUT "$query_calltype[$i]\t $query_calltime[$i]\t $query_A_number[$i]\t $query_B_nember[$i]\t $query_calldurt[$i]\t $query_normalfe[$i]\t $query_normalfe[$i]\t $query_balanceA[$i]\n";
}
close(OUT);
Can somebody tell me how should I can solve this problem ?
Thanks,
Mahesh Fernando.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to assign the current user to a variable in my perl script.
My first attempt using Solaris 8 (perl 5) is:
$VAR = system(logname);
However, this assigns 0 to $VAR, and outputs the user to the screen. Does anyone know the command that I need?
Thanks,
seismic_willy (2 Replies)
Discussion started by: seismic_willy
2 Replies
2. Shell Programming and Scripting
Hi All,
I pass a Perl script variable, whch is passed to a query to be prepared. But the problem is I have special character like '&' in this variable which are handled in a special way by the Oracle query parser. How do I get over this?
my $cust_name='A&B';
my $sql="Select cust_short_name... (1 Reply)
Discussion started by: rahulrathod
1 Replies
3. Shell Programming and Scripting
hi
I've been searching all over the internet to simply do the following:
$tempfile = "/usr/school/tempfile.dat";
$myvar = param('add'); ###add is the variable assigned to a popup menu
`ls -l $myvar * >> $tempfile` ###I also tried `ls -l ${myvar}* >>$tempfile`
open(ADDLIST,... (6 Replies)
Discussion started by: mehdi9
6 Replies
4. Shell Programming and Scripting
I would like to use the result of a query in another query. How do I redirect/add the output to another variable?
$result = odbc_exec($connect, $query);
while ($row = odbc_fetch_array($result)) {
echo $row,"\n";
}
odbc_close($connect);
?>
This will output hostnames:
host1... (0 Replies)
Discussion started by: hazno
0 Replies
5. Shell Programming and Scripting
Hi
How do i assign the output of a unix command to a variable ? say i want the whoami output to be assigned to a variable?
Thanks (2 Replies)
Discussion started by: PrasannaKS
2 Replies
6. UNIX for Advanced & Expert Users
Hi Everyone,
Can anyone help me how do i call hash variable in to sql query in perl. Please see the script below
i have defined two Hash %lc and %tab as below
$lc{'REFF'}='V_RES_CLASS';
$lc{'CALE'}='V_CAP_CLASS';
$lc{'XRPD'}='V_XFMR_CLASS';
$tab{'V_RES_CLASS'}='V_MFR_SERS';... (6 Replies)
Discussion started by: jam_prasanna
6 Replies
7. Shell Programming and Scripting
Hi guys
I am having this strange issue.Well my requirement is like below
Compare two values between flat file and oracle DB
Via perl script I am easily getting the rowcount
Now I connect sql plus via perl and the column value that returns is string
my $sqlplus_settings = '';
my... (7 Replies)
Discussion started by: Pratik4891
7 Replies
8. Shell Programming and Scripting
I have two variables,
my $filename = "abc_yyyy_mm_dd.txt";
my $filename1 = " abc_2011_11_07.txt";
I need to perform some operations after checking if $filename has $filename1 in it
i have used the below code,
if($filename =~ /^$filename1/)
{
----
--
} (2 Replies)
Discussion started by: irudayaraj
2 Replies
9. Shell Programming and Scripting
Hi ,
I am facing error in perl
when I assign a below query in a varibale $query because of new line charchters
$query=
SELECT XYZ
, ABC
, c2
, c3
, c4
FROM t1
how can i get rid of new line charchters with out changing the... (2 Replies)
Discussion started by: gvk25
2 Replies
10. Shell Programming and Scripting
Using ksh, I am using SQLPlus to execute a query with a filter using a string variable.
REPO_DB=DEV1
FOLDER_NM='U_nmalencia'
FOLDER_CHECK=$(sqlplus -s /nolog <<EOF
CONNECT user/pswd_select@${REPO_DB}
set echo off heading off feedback off
select subj_name
from subject
where... (5 Replies)
Discussion started by: nkm0brm
5 Replies
LEARN ABOUT OSX
apache2::filterrec
apache_mod_perl-108~358::mod_perl-2.0.7::docs::api::ApacUser:Contributed)apache_mod_perl-108~358::mod_perl-2.0.7::docs::api::Apache2::FilterRec(3)
NAME
Apache2::FilterRec - Perl API for manipulating the Apache filter record
Synopsis
use Apache2::Filter ();
use Apache2::FilterRec ();
my $frec = $filter->frec;
print "filter name is:", $frec->name;
Description
"Apache2::FilterRec" provides an access to the filter record structure.
The "Apache2::FilterRec" object is retrieved by calling "frec()":
$frec = $filter->frec;
API
"Apache2::FilterRec" provides the following functions and/or methods:
"name"
The registered name for this filter
$name = $frec->name();
obj: $frec ( "Apache2::FilterRec object" )
ret: $name (string)
since: 2.0.00
mod_perl filters have four names:
modperl_request_output
modperl_request_input
modperl_connection_output
modperl_connection_input
You can see the names of the non-mod_perl filters as well. By calling "$filter->next->frec->name" you can get the name of the next filter
in the chain.
Example:
Let's print the name of the current and the filter that follows it:
use Apache2::Filter ();
use Apache2::FilterRec ();
for my $frec ($filter->frec, $filter->next->frec) {
print "Name: ", $frec->name;
}
See Also
mod_perl 2.0 documentation.
Copyright
mod_perl 2.0 and its core modules are copyrighted under The Apache Software License, Version 2.0.
Authors
The mod_perl development team and numerous contributors.
perl v5.16.2 2011-apache_mod_perl-108~358::mod_perl-2.0.7::docs::api::Apache2::FilterRec(3)