|
|
Up |
|
|
  |
Author: axtensaxtens
Date: Feb 6, 2008 22:43
G'day everyone
I have a VB application (though it could easily be any other 3GL)
which calls a PerlCtrl'd COM object. What I'd like to be able to do is
to create a real (or ersatz) callback mechanism. The idea would be to
pass to the Perl object a long containing the address of a function or
procedure and have Perl call that address. IIRC, the COM object would
run in-process so the address would be meaningful within that
context.
I can generate the address and pass it in to the COM. What I don't
know is how to have Perl either call or jump to that address.
Any ideas? Should I give up now, before I do any damage?
Kind regards,
Bruce.
|
| |
|
| |
1 Comment |
|
  |
|
|
  |
Author: clearguy02clearguy02
Date: Feb 6, 2008 14:59
Hi all,
I have this file, test.txt and I want to replace a string "bsmith"
with "brsmith" in that file from a command line itself (windows xp).
how can i do it?
Thanks
J
|
| |
|
14 Comments |
|
  |
Author: Michele DondiMichele Dondi
Date: Feb 6, 2008 14:32
On Tue, 05 Feb 2008 17:21:35 GMT, Jürgen Exner hotmail.com>
wrote:
>>not matching the string 'disable' in $_
>
> if (m/$featureId/ and index($_, 'disable') == -1)
>
>This is assuming that $featureId actually does contain a regex. Otherwise it
>would be better to replace the match with an index() call, too.
I beg to differ, since a match is more intuitively readable (to a Perl
programmer) and AFAIK when a constant string is involved, then it is
optimized to a simple index() anyway.
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
|
| |
|
1 Comment |
|
  |
Author: jsahiwaljsahiwal
Date: Feb 6, 2008 14:16
Perl Guru's
I am not able to find the right options for my message queue. I would
like for the queue to receive messages as soon as they are sent, but
am receiving them after the queue is removed. Seems like a blocking
issue but I am not sure. Posting the two small script I am stuck with.
Would appreciate constructive response.
Sending the message as the incoming argument.
use IPC::Msg;
use IPC::SysV;
$outgoing=$ARGV[0];
$key = 999;
$queue = msgget($key,0) or die $!;
my $type = 1234;
#$queue = new IPC::Msg($key,0);
$string = "This";
#$message = pack(A4,"This");
$message = pack("A*",$outgoing);
print $message;
msgsnd($queue,$message,0);
|
| Show full article (1.12Kb) |
|
no comments
|
|
  |
Author: OMouseOMouse
Date: Feb 6, 2008 13:28
On Feb 5, 7:27 pm, shul gmail.com> wrote:
> Hi I am using
> emacs GNU Emacs 21.4.1, with CPerl mode enabled.
> on debian sid.
>
Try upgrading to GNU Emacs 22.x or at least try to grab the latest
version of CPerl mode.
Could you please paste some more lines of code as an example? I tried
the ones shown and I had no problem with it.
-Rudolf
|
| |
|
1 Comment |
|
  |
Author: Ilya ZakharevichIlya Zakharevich
Date: Feb 6, 2008 13:04
[A complimentary Cc of this posting was sent to
shul
gmail.com>], who wrote in article <45f2e581-b4e8-4d50-b9f1-0dd72d84088b@p69g2000hsa.googlegroups.com>:
> my $old_z=3;
> my $old_y = 4;
>
> ...
> some more lines of code
> ...
>
> the second line shows the 4 in a funny color
RMS Emacs comes with a modified version of CPerl which is, more or
less, unusable.
Hope this helps,
Ilya
|
| |
|
no comments
|
|
  |
Author: smallpondsmallpond
Date: Feb 6, 2008 12:40
On Feb 6, 1:10 pm, Caduceus fusemail.com> wrote:
> Hi:
>
> A lot of people tell me that this perl script is used for spamming. I
> was thinking of using it until I heard it was used for spamming. If
> it's used for spamming I don't want it. Is this perl script used for
> spamming? TIA
>
You could have just posted a link to the website that the source
is from and read the description there:
http://www.julianhaight.com/useful.shtml
Julian Haight is the founder of SpamCop.
Your question is not a perl question, it is an ethics question.
Computers are used for spamming, so you should not use them either.
-- S
|
| |
|
no comments
|
|
  |
Author: alx__21alx__21
Date: Feb 6, 2008 12:40
Hi,
I'm looking for something that is like eval in that it can compile and
run code from strings, but will quit after a maximum given time.
The benchmark module tool "timethis" is very close, but it can only
ever specify a minimum time to iterate the given code. What I want is
code that iterates ONCE, breaking at a maximum time that I can specify
(if it runs that long).
If anybody knows of a function to do this I would appreciate it. I
would rather not have to start digging around in the source for
timethis to create my own.
Thanks.
|
| |
|
12 Comments |
|
  |
|
|
  |
Author: PerlFAQ ServerPerlFAQ Server
Date: Feb 6, 2008 12:03
This is an excerpt from the latest version perlfaq2.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .
--------------------------------------------------------------------
2.9: What are the Perl newsgroups on Usenet? Where do I post questions?
Several groups devoted to the Perl language are on Usenet:
comp.lang.perl.announce Moderated announcement group
comp.lang.perl.misc High traffic general Perl discussion
comp.lang.perl.moderated Moderated discussion group
comp.lang.perl.modules Use and development of Perl modules
comp.lang.perl.tk Using Tk (and X) from Perl
comp.infosystems.www.authoring.cgi Writing CGI scripts for the Web.
|
| Show full article (2.73Kb) |
|
no comments
|
|
|
|
|
|
|