Query string assingment for other variable in PERL


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Query string assingment for other variable in PERL
# 1  
Old 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. Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell Script (ksh) - SQLPlus query filter using a string variable

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

2. Shell Programming and Scripting

Formating of query variable in perl

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

3. Shell Programming and Scripting

PERL : pattern matching a string stored in a variable

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

4. Shell Programming and Scripting

String variable to numeric conversion in perl

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

5. UNIX for Advanced & Expert Users

Passing Hash variable in to sql query in perl

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

6. Shell Programming and Scripting

Perl - Command assingment to variable.

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

7. Shell Programming and Scripting

add the output of a query to a variable to be used in another query

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

8. Shell Programming and Scripting

perl scalar variable in backquoted string

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

9. Shell Programming and Scripting

Perl script variable passed to Oracle query

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

10. Shell Programming and Scripting

perl variable assingment

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
Login or Register to Ask a Question