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)
Hi All.
I need help for the below logic.
I ve a file like following
input file:
NopTX(5) // should be remain same as input
----Nop(@100); //1
Nop(90); //2
--Nop(80); //3
@Nop(70); //4
--@Nop(60); //5
@Nop@(@50); //6
--Nop@( 40); ... (3 Replies)
I am writing a script to cross check the dbscript. For that I am searching the SQL manipulators in the dbscript as shown below. But my problem is the variable $pattern is coming as null when comes out of the foreach loop.
File content:
=========
vi /home2/niroj_p/dbscript.sql
-------... (1 Reply)
HI ,
Is there any way to return a value of variable from shell to perl script.
Code:
===
Perl file
my $diff1=system("sh diff.sh");
my $diff2=system("sh diff1.sh");
I need exit status of below commands
i.e 0 and 1 respectively.
Since in both the cases diff is working so system... (3 Replies)
Hi,
I have a perl script which prints epoch value of date in milliseconds as the output.
My reuirement is that once the output is printed,the day variable shld increment by 1 and when i execute the script for the second time the output shld be for the new day value.
My script looks as... (11 Replies)
I am working on a perl script that is used to update a list of hosts to a certain file but I am having an issue when I try to perform a check to make sure the user enters valid information. The following is what I have currently written for the script:
IPINPUT:
print "Enter IP Address: ";... (2 Replies)
HI all,
These are examples of the original value from a variable
$abc can be
FastEthernet1/0
GigabitEthernet3/1
Serial1/0
If $abc is FastEthernet*/* (where * can be any number), replace $abc value to fa*/* (same number as the original value). GigabitEthernet becomes ga*/* and Serial... (2 Replies)
Hey,
So I have a shell script that outputs some variables, call them $a and $b. I know in shell scripting if I wanted to use the variables in another shell script I'd do
sh code.sh "$a" "$b"
How can I do something similar with perl? (2 Replies)
Hi All,
I need to pass a variable from bash script to perl script and in the perl script i am using those variables in the sql query but its giving
error :
Use of uninitialized value $ENV{"COUNTRYCD"} in concatenation (.) or string at /GIS_ROOT/custom/tables/DBread_vendor.pl line 50.
Can ... (6 Replies)
Hi
I want to replace time stamp in the following line
PROCNAME.Merge.exchMon.CODE.T_QSTART 08:45 read
assuming the new time stamp is 09:45 ; the line is getting replaced as below
:45 read
I'm trying to use the perl one liner in bash script
perl -pi... (4 Replies)
Discussion started by: charlie87
4 Replies
LEARN ABOUT SUSE
xfreeeventdata
XGetEventData(3) XLIB FUNCTIONS XGetEventData(3)NAME
XGetEventData, XFreeEventData, XGenericEventCookie - retrieve and free additional event data through cookies.
SYNTAX
Bool XGetEventData(Display *display, XGenericEventCookie *cookie);
void XFreeEventData(Display *display, XGenericEventCookie *cookie);
ARGUMENTS
display Specifies the connection to the X server.
cookie Specifies the cookie to free or retrieve the data for.
STRUCTURES
typedef struct {
int type;
unsigned long serial;
Bool send_event;
Display *display;
int extension;
int evtype;
unsigned int cookie;
void *data;
} XGenericEventCookie;
DESCRIPTION
Some extension XGenericEvents require additional memory to store information. For these events, the library returns a XGenericEventCookie
with a token ('cookie') unique to this event. The XGenericEventCookie's data pointer is undefined until XGetEventData is called.
The XGetEventData function retrieves this extra data for the given cookie. No round-trip to the server is required. If the cookie is
invalid or the event is not an event handled by cookie handlers, False is returned. If XGetEventData returns True, the cookie's data
pointer points to the memory containing the event information. A client must call XFreeEventData to free this memory. XGetEventData
returns False for multiple calls for the same event cookie.
The XFreeEventData function frees the data associated with a cookie. A client must call XFreeEventData for each cookie claimed with
XGetEventData.
EXAMPLE CODE
XEvent event;
XGenericEventCookie *cookie = &ev;
XNextEvent(display, &event);
if (XGetEventData(display, cookie)) {
handle_cookie_event(cookie->data);
} else
handle_event(&event);
}
XFreeEventData(display, cookie);
NOTES
A cookie is defined as unclaimed if it has been returned to the client through XNextEvent but its data has not been retrieved via
XGetEventData. Subsequent calls to XNextEvent may free memory associated with unclaimed cookies. Multi-threaded X clients must ensure
that XGetEventData is called before the next call to XNextEvent.
SEE ALSO XNextEvent(3),
Xlib - C Language X Interface
X Version 11 libX11 1.3.2 XGetEventData(3)