Hi All!
I am trying to use pipes in win32
in my main program (in C) I have:
FILE *fd = _popen("perl d:/umts/catch_in.pl" , "wb");
int i=12;
fwrite((void*)&i,1,4,fd);
ie=fflush(fd);
_pclose(fd);
my perl code (in catch_in.pl) is :
-
use strict;
use warnin
At 08:59 PM 4/5/2006 -0400, Bullock, Howard A. wrote:
>Thanks, I believe you may be correct in that some characters are not being
handled properly. But can anyone point me in the direction of generic
solution so that this will function regardless of language? The data comes
directly from Win32::Ne
> I bet this is the problem. The á character seems to be in unicode rather
>than ascii. U can try directly inputting it with Alt+0225 or doing >chr(225)
>(or whatever it is in Hungarian encoding).
Thanks, I believe you may be correct in that some characters are not being
handled properly. But c
U had me confused. I thought u wanted to make this run slower because it
was bogging down ur computer or something. But based on ur script comments
and other posts it seems u want to make it run faster. So u want to "reduce
the time of execution" not the "speed of execution".
At 05:18 PM 4/5/20
At 10:30 PM 4/4/2006 -0700, David Wheeler wrote:
>Ah, no, I haven't. I was trying to avoid shell interpolation. But
>you're right, it just might be the simplest solution.
If there are no shell metacharacters present, it won't start up a shell. So
as long as the argument is a simple command, pe
At 06:21 PM 4/5/2006 -0400, Bullock, Howard A. wrote:
>#THIS SCRIPT WORKS CORRECTLY FOR OTHER OS LANGUAGES:
># ENGLISH - WORKS (Administrators)
># SPANISH - WORKS (Administratadores)
># GERMAN - WORKS (Administratoren)
># HUNGARIAN - FAILS (Rendszergazdák) WITH 2220 (group name could not be
<>
The test script attempts to use both Win32::NetAdmin::LocalGroupAddUsers and
Win32::Lanman::NetLocalGroupAddMembers to add members to a specified group. But
the name of the group passed to the methods does not appear to be correct when
applied to the Hungarian.
Please review the script and
> -Original Message-
> From: Jan Dubois [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, April 05, 2006 2:24 PM
> To: Steven Manross; perl-win32-users@listserv.ActiveState.com
> Subject: RE: sleep oddness
>
> On Wed, 05 Apr 2006, Steven Manross wrote:
> > Has anyone seen an issue where "slee
Mark,
Whoops, one thing wrong with this ... since you don't sort
before creating your hash, if the order of the data was such that the
newer version appears earlier in the array, your results are wrong.
Anyway you can throw the sort into the first line?
Bill
-Original Message-
Fr
Thanks Peter, that will help.
I am wondering if the use of anonymous hash and array
may make more sense here than doing a bunch of `grep`.
Can somebody show me how I would use it here?
--- Peter Eisengrein <[EMAIL PROTECTED]> wrote:
> >
> > I have this program below that work correcly but
> the
Bill Ng wrote:
> Okay,
>
> Here's what I've come up with:
> --
> @list = ("aacs1110", "brbt4332", "rtxa4320", "aacs2000",
> "brig5621", "brbt5220", "nbvc");
> @list = sort @list;
>
> foreach $item (@list) {
> $itemPref = substr($item, 0, 4);
> $itemVers = substr($item, 4);
Bill,
I'm amused you call this efficiency when you said you didn't care about
efficiency:-) Of course, it depends on one's definitions...
Here are several I came up with, with times for sample data (3 data
points):
($pref,$suf)=/(.{4})(.{4})/o; # Time for 3 .294
($pref,$suf
Ng, Bill wrote:
> That's incorrect though, since your output shows two copies of aacs
> and brbt ...
>
> Bill
>
> -Original Message-
> From: Wagner, David --- Senior Programmer Analyst --- WGO
> [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, April 05, 2006 5:02 PM
> To: Ng, Bill; perl-win3
Steven Manross wrote:
> Has anyone seen an issue where "sleep 1;" causes an infinite loop in
> perl (100% CPU usage -- no movement in the script)? Build 816 in case
> it matters.. It just started happenning today in a script I wrote a
> very long time ago and haven't modified in a while. Similar
On Wed, 05 Apr 2006, Steven Manross wrote:
> Has anyone seen an issue where "sleep 1;" causes an infinite loop in
> perl (100% CPU usage -- no movement in the script)? Build 816 in case
> it matters.. It just started happenning today in a script I wrote a
> very long time ago and haven't modified i
That's incorrect though, since your output shows two copies of aacs and
brbt ...
Bill
-Original Message-
From: Wagner, David --- Senior Programmer Analyst --- WGO
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 05, 2006 5:02 PM
To: Ng, Bill; perl-win32-users@listserv.ActiveState.com
Su
@myArray = ("aacs1110", "brbt4332", "rtxa4320", "aacs2000", "brig5621",
"brbt5220", "nbvc");
foreach $data (@myArray) {
$data =~ /()()/;
if ($hash{$1} < $2) {
$hash{$1} = $2;
}
}
foreach $key (keys %hash) {
print $key ." = ".$hash{$key}."\n";
}
Seems to work...
Steven
>
Has anyone seen an issue where "sleep 1;" causes an infinite loop in
perl (100% CPU usage -- no movement in the script)? Build 816 in case
it matters.. It just started happenning today in a script I wrote a
very long time ago and haven't modified in a while. Similarly, running
perl from the comm
[EMAIL PROTECTED] wrote:
> Okay,
>
> Here's what I've come up with:
> --
> @list = ("aacs1110", "brbt4332", "rtxa4320", "aacs2000", "brig5621",
> "brbt5220", "nbvc");
> @list = sort @list;
>
> foreach $item (@list) {
> $itemPref = substr($item, 0, 4);
> $itemVers = substr($i
For my own amusement and edification, if nothing else:
##
@myArray = ("aacs1110", "brbt4332", "rtxa4320", "aacs2000", "brig5621",
"brbt5220", "nbvc");
#I'm using the assumption that the version numbers only increase in time.
print "@myArray\n\n";
while($myArray[$x]) {
[EMAIL PROTECTED] wrote:
> Since Efficiency seems to be the topic of the day,
>
> My situation, I have an array filled with 8-character strings, a
> few thousand of them. First 4 chars are letters, last 4 are numbers.
> Examples - abcd1234, zyxw9876, etcc. The letters portion is a
> pr
Okay,
Here's what I've come up with:
--
@list = ("aacs1110", "brbt4332", "rtxa4320", "aacs2000", "brig5621",
"brbt5220", "nbvc");
@list = sort @list;
foreach $item (@list) {
$itemPref = substr($item, 0, 4);
$itemVers = substr($item, 4);
$h{$itemPref} = $itemVers; }
fo
Friends,
I would like to learn how to enter a name and password with Perl, using LWP.
I'm sure this exercise will be instructive for others looking in, also.
I have set up an e-mail account for this purpose. The address is
"[EMAIL PROTECTED]" and the password is "perl". Use it as you see fit.
Since Efficiency seems to be the topic of the day,
My situation, I have an array filled with 8-character strings, a
few thousand of them. First 4 chars are letters, last 4 are numbers.
Examples - abcd1234, zyxw9876, etcc. The letters portion is a
prefix, the numbers is a version. In
Yekhande, Seema (MLITS) wrote:
Does anyone is having different idea about reducing the speed in
execution? This I am finding out about how to reduce the speed.
You can reduce the speed by: 1) running on a slower machine, 2) running
other compute-intensive programs at the same time, or 3) ins
> Actually Regex is taking more time instead of agrep. That's
> why the idea
> of using either agrep or find.
> This is small input.txt which I am using it as a input file.
> If there is any other way of increasing the speed of same Perl script,
> it is really required.
>
I don't have agrep but
> Actually Regex is taking more time instead of agrep. That's
> why the idea of using either agrep or find.
> This is small input.txt which I am using it as a input file.
> If there is any other way of increasing the speed of same
> Perl script, it is really required.
This has a chance of being
On Wed, 5 Apr 2006, Yekhande, Seema (MLITS) wrote:
> Actually Regex is taking more time instead of agrep. That's why the idea
> of using either agrep or find.
What's the difference? Several times? Twice? A bit? I haven't been paying
attention, so pardon if I missed something. For each invocation
Actually Regex is taking more time instead of agrep. That's why the idea
of using either agrep or find.
This is small input.txt which I am using it as a input file.
If there is any other way of increasing the speed of same Perl script,
it is really required.
Thanks,
Seema.
-Original Message--
>
> I have this program below that work correcly but the
> performance is slow if the files are big. How can I
> write a program to do this instead the one I wrote.
>
Without getting into too much detail there are several things that can help,
all are related to the overall architecture of the c
> system(qq~agrep "$fir\t$sec\t" $outfile > tmp~); ## agrep is an external
> utility to find search pattern in a file and transfer it into other file.
> system(qq~agrep "$thr" tmp > tmp1~); ## agrep is more faster than regular
> expression.
Are two system calls to agrep really faster than a
Roger,
I don't know what the answer is, but I'll bet it's no coincidence that
chr(3) is ansii for the heart symbol.
print chr(3); # This prints the character for a heart from a Windows file:
<>; # Make it so the DOS window doesn't disappear before you
hit return
Show me a cou
Title: Want to reduce the speed of execution in Perl script.
Dear All,
Suppose I have a log length tab-separated file, in this file I have to make the average of numbers based on certain parameters
as hour, group name and monitor name. This program takes long time in running.
my ($infil
Roger Mayfield wrote:
> I have a script that connects to IRC, it outputs to the STDIN messages
> heard in the chatroom. Whenever someone writes in color, it shows a
> heart followed by 03. Now I know to display color in IRC you use the
> escape code \003.
>
> My question is how would I transpo
I have a script that connects to IRC, it outputs to the STDIN messages
heard in the chatroom. Whenever someone writes in color, it shows a
heart followed by 03. Now I know to display color in IRC you use the
escape code \003.
My question is how would I transpose the IRC escape sequence into a
35 matches
Mail list logo