From: perl-win32-users-boun...@listserv.activestate.com
[mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of Greg
Aiken
Sent: Monday, November 26, 2012 9:19 AM
To: Perl-Win32-Users@listserv.ActiveState.com
Subject: 'mysplit' ???
i just ran across a perl recursion example that
Hi Daniel -
http://stackoverflow.com/questions/6473785/improving-lwpsimple-perl-performance
should bring you on the right track. If you want to avoid multiple
threads/processes then "Keep-Alive" most likely will give you the biggest
performance gain. The TCP connection stays open after you made
Keys can be used as an lvalue.
$ perldoc -f keys
...
As an lvalue "keys" allows you to increase the number of hash
buckets allocated for the given hash. This can gain you a
measure of efficiency if you know the hash is going to get big.
(This is sim
With PDK compiled EXEs you can also PDK-specific PerlApp::exe() function
(http://docs.activestate.com/pdk/9.1/PerlApp.html#perlapp_exe) to easily get
the path of the PDK application that's currently executing.
So something like:
my $folder=PerlApp::exe();
$folder=~ s/(.*?)[^\\\/]+$/$1/;
print $
I googled for 5 secs :)
http://www.bribes.org/perl/ansi.html - maybe SetMonitorState() can help.
Cheers - Tobias
From: perl-win32-users-boun...@listserv.activestate.com
[mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of Barry
Brevik
Sent: Friday, April 06, 2012 11:53 AM
To
You are not changing the directory while traversing. Whenever you access
"$nxtfile", you'll need to access it as "$targetdir/$nxtfile". So, this (among
other things):
$fileTotalSize += (-s $nxtfile);# THIS IS LINE 61 REFERRED TO IN
THE ERROR MSG.
Needs to become:
$fileTotalSi
The whitespaces around the separator characters are not allowed in strict CSV.
Try this below.
Cheers - Tobias
use strict;
use warnings;
use Text::CSV;
my $csv = Text::CSV->new({ allow_whitespace => 1 });
open my $fh, "<&DATA" or die "Can't access DATA: $!\n";
while (my $row = $csv->getline($fh
No need to use the /s and /g modifiers on the regexp. Try this below.
Cheers - Tobias
$ cat foo.pl
use strict;
use warnings;
my $foo=qq{OCT 31 - Attended CSP weekly meeting. Engaged in third party SCADA
host (ZedI) problem in Fairview district
NOV 1 - Preparation and attendance of Normandville P
What's wrong with the builtin 'mkdir' call (perldoc -f mkdir)? Also look at
File::Path's mkpath (or make_path) function
(http://search.cpan.org/~dland/File-Path-2.08/Path.pm).
Cheers - T
-Original Message-
From: perl-win32-users-boun...@listserv.activestate.com
[mailto:perl-win32-user
Since the advent of NTP on the Windows platforms I don't remember the last time
there was a need to set the time manually :-)
Thanks- T
-Original Message-
From: Howard Tanner [mailto:tan...@optonline.net]
Sent: Monday, September 26, 2011 5:26 PM
To: Tobias Hoellrich; 'Ba
Also take a look at "net time":
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/net_time.mspx?mfr=true
Cheers - T
-Original Message-
From: perl-win32-users-boun...@listserv.activestate.com
[mailto:perl-win32-users-boun...@listserv.activestate.com] On Behal
perldoc -f splice
Cheers - Tobias
-Original Message-
From: perl-win32-users-boun...@listserv.activestate.com
[mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of Barry
Brevik
Sent: Wednesday, September 07, 2011 11:38 AM
To: perl-win32-users@listserv.ActiveState.com
Su
$txt =~ s/^(.{1,39}).*$/$1/;
or
$txt = substr($txt,0,39);
--T
-Original Message-
From: perl-win32-users-boun...@listserv.activestate.com
[mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of Barry
Brevik
Sent: Thursday, June 30, 2011 11:49 AM
To: perl-win32-users@li
Take a look at the Date::Parse module as well, as it can handle a lot of
different Date/Time formats. You may need to "find" the Date/Time string first
(that should be a few simple regexps) and then hand it off to Date::Parse.
Personally I would take that approach on a number of sample messages
There are tons of POP3 related modules on CPAN:
http://cpan.uwinnipeg.ca/search?query=pop3&mode=dist
I've used Mail::POP3Client in the past and your task could be easily
implemented with it:
http://cpan.uwinnipeg.ca/htdocs/Mail-POP3Client/Mail/POP3Client.html
Cheers - Tobias
-Original Messa
By the way, do yourself a favor and install Data::Dumper and then use it as
follows:
use Data::Dumper;
...
my @results = $mySQL->runQuery("Select A,B from tablename;");
...
print Dumper(\...@results);
Data::Dumper will do its best to dump everything that's
Cheers - T
-Original Message-
From: Dennis Daupert [mailto:ddaup...@csc.com]
Sent: Wednesday, June 03, 2009 9:01 AM
To: Tobias Hoellrich
Cc: perl-win32-users@listserv.ActiveState.com
Subject: RE: Advice requested, porting unix perl app to windows
Hi Tobias,
Thanks for the information. T
Dennis - there's a Net::SFTP module (http://cpan.uwinnipeg.ca/dist/Net-SFTP),
which is a pure-perl implementation of the SFTP protocol. The bottom of the
page also seems to suggest that various Windows PPM packages are available for
it.
Hope this helps - Tobias
-Original Message-
From
Take a look at "perldoc Win32" and specifically Win32::GetFullPathName. No idea
if it'll help in your case, but it's worth a try.
Cheers - T
From: perl-win32-users-boun...@listserv.activestate.com
[mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of Greg
Aiken
Sent: Monday,
Jeremy - you will need to check the "Accept-Encoding" http header to determine
whether the browser can accept compressed output. If you find the word "gzip"
(/\bgzip\b/) in this header's value you can compress the output (with the
method below).
If you are going to send compressed output, you w
Andy - do yourself a favor and don't try it manually. This problem has been
solved by a number of publicly available modules already. Take a look at
HTML::Parser (or HTML::PullParser) for example, which offers extraction of
content between opening and closing tags.
Hope this helps
Tobias
Fr
Try:
$|++;
to unbuffer STDOUT.
Hope this helps - Tobias
On Aug 10, 2008, at 4:16 PM, "Daniel Burgaud" <[EMAIL PROTECTED]> wrote:
> Hi
>
> I have a simple script that uses print in a loop to update the
> screen something like this:
>
> for ( ) {
> .
> .
> .
> print ".";
> }
Make sure that the location of "cl.exe" is in your PATH environment
variable. Or better yet: I seem to remember that VC++ installs a start
menu entry that says something like "Open VC++ Command Prompt". That one
will have all the necessary environment additions to run cl.exe
successfully. Use it an
use strict;
my $word='word2';
my $para='word1 word2 word3';
my $re=qr{$word};
if($para =~ $re) {
print "what follows the match = $'\n";
} else {
print "why wasnt '$word' found in '$para'?\n";
}
Hope this helps - Tobias
From: [EMAIL PROTECTE
Randy - thanks for providing this service. I've been using numerous
packages from your ppm-server in the past, but I never said "THANK
YOU!". It's christmas-time, so it's the perfect time to fix that: THANK
YOU!
Happy holidays to you and yours - Tobias
> -Original Message-
> From: [EMAIL
Perfectly fine the way you wrote it - why involve a regexp when you got
an elegant solution? If you insist on a regexp, try this instead:
$current_file = (split(/[/\\]/,$current_file))[-1];
Tobias
PS: How's Adobe treating you? ;-)
From: [EMAIL PROTECTED]
This one runs about 10-15 times faster on my system. Toggle $useVec to
alternate between your old version and the one that uses vec(). Please
not that vec() is big-endian. I verified that the output of both
versions are identical.
Hope that helps
Tobias
use strict;
use warnings;
my $header;
my
Using the OO interface of Digest::MD5 will avoid the
read-the-whole-file-at-once problem:
use Digest::MD5;
my $file = shift;
open(FILE, $file) or die "Can't open '$file': $!";
binmode(FILE);
print Digest::MD5->new->addfile(*FILE)->hexdigest, " $file\n";
An
Here you go:
cut here --
C:\>type \perl\site\lib\AudioFile\plugins.yaml
---
AudioFile::Info::MP3::Tag:
pure_perl: 1
read_mp3: 1
read_ogg: 0
write_mp3: 1
write_ogg: 0
default:
mp3:
name: AudioFile::Info::MP3::Tag
score: 100
C:\>
cut
Hmm - I installed and used AudioFile::* in the past and I don't recall having
an issue like you describe below. The individual "plugins" for AudioFile::Info
are supposed to register themself during installation. They will read and write
the plugins.yaml file that you refer to below. Look at this
Chris - go ahead and install SOAP::Lite ('ppm install SOAP::Lite'), then
head over to http://www.soaplite.com/ and read, read, read ;-)
Just looking at the PHP code, I think it shouldn't take more than an
hour to recreate the PHP-code in Perl.
Hope this helps
Tobias
> -Original Message--
Take a look at the Win32::API module on CPAN, it does exactly what
you're asking for. Here's a short sample that uses it:
http://www.osix.net/modules/article/?id=81
Hope this helps
Tobias
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of B R
>
I've used Net::Pcap for a number of projects on Unix. Looks like there's
a windows version as well (http://www.bribes.org/perl/wnetpcap.html).
Net::Pcap uses the pcap library (see www.winpcap.org), which is at the
heart of applications like tcpdump/windump. You can specify filter
criteria (for the
This:
cut here
while() {
$cnt=()=$_=~ /;/g;
$matches{$cnt}++;
}
print "found $_ ; in $matches{$_} line(s)\n"
foreach (sort {$b <=> $a } keys %matches);
__DATA__
NEW ANALOGUE; A.PS.19.601; 0; 4;NA; 0;OFF;%;NO;
100.0;0.0;"ANALOGUE CARD #100 INPUT
$ cat foo
This is line 1
This is line 2
This is line 3
$ perl -pe 's/$/\\par/' foo > bar
$ cat bar
This is line 1\par
This is line 2\par
This is line 3\par
$
Hope this helps
Tobias
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Chris O
Sent: Sunday,
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Daniel McBrearty
> Sent: Friday, October 27, 2006 6:17 AM
> To: $Bill Luebkert
> Cc: perl-win32-users@listserv.ActiveState.com
> Subject: Re: sharing access to a socket
>
> thanks Bill. but why is i
Try $mech->tick('samenet', "checkbox", '0'); as opposed to $mech->tick(samenet,
"checkbox", '0');
Hope this helps
Tobias
-Original Message-
From: [EMAIL PROTECTED] on behalf of Mark Funk
Sent: Mon 9/11/2006 1:52 PM
To: Perl-Win32-Users@listserv.ActiveState.com
Subject: Error using WWW-
Why don't you use mysql's Date-functions to compute the last ten days,
something along the lines of:
select * from yourtable where dateColumn >= DATE_SUB(CURDATE(),
INTERVAL 10 DAY);
Hope this helps
Tobias
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECT
In my case, every single OOO message via the win32-users list (actually any
non-work list) ends up in Spampal's (www.spampal.org) black-list, which
means I'm never, ever going to see a message from that user (that
email-address) again. This also locks out legit messages from those users,
but that's
I don't see a benefit in reading the whole file into memory. Try this:
my $del=qr{||~};
binmode(STDIN);
s{$del}{}g,map($c[ord($_)]++,split(//,$_)) while(<>);
foreach(0..255) {
printf "%3d = %d\n", $_, defined($c[$_])?$c[$_]:0;
}
Tobias
> -Ori
What happens if you replace the:
LogClose(shift);
with
$_[0]->LogClose();
Cheers
Tobias
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Dirk Bremer (NISC)
> Sent: Tuesday, May 25, 2004 8:14 AM
> To: [EMAIL PROTECTED]
> Subjec
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of [EMAIL PROTECTED]
> Sent: Friday, May 21, 2004 2:51 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RE: A question for zip file with different extension
>
>
> Do I need to open each file an
See if the first four bytes of the file match:
/PK\003\004/
Hope this helps
Tobias
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of [EMAIL PROTECTED]
> Sent: Friday, May 21, 2004 2:17 PM
> To: [EMAIL PROTECTED]
> Subject: A question for
Works fine, once you know what the difference between system and qx is (read
"perldoc -f system" and "perldoc perlop" [search for `STRING` in the later
one]).
(on FreeBSD):
frisco% pwd
/usr
frisco% perl -v
This is perl, v5.6.1 built for i386-freebsd
Copyright 1987-2001, Larry Wall
Perl may be
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Eric Edwards
> Sent: Monday, December 22, 2003 9:38 PM
> To: [EMAIL PROTECTED]
> Subject: /T in date
>
>
> Hello list-
> $Bill sent me this code today. It works. The /T is what
> made it work on m
> -Original Message-
> Subject: Perl 5.8 problems with print
>
> code
>
> print "Processing Data ";
> while () {};
> print "Finished\n";
>
> Question
> why do I not see any output until I send "Finished\n" when
> running the .pl or the perlapp equiv but if I call with -d
> (PDK) it work
Try naming all your gui-objects and it'll do wonders:
$main->AddLabel(-text => $text, -name => "foobar");
HTH
Tobias
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Eric Hillman
> Sent: Wednesday, October 08, 2003 4:56 PM
> To: Perl-Wi
And what happens if you say:
$DNS->{'NameServer'}=["$primary\0$secondary\0","REG_SZ"];
HTH
Tobias
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of steve silvers
> Sent: Wednesday, October 01, 2003 9:48 AM
> To: [EMAIL PROTECTED]
> Subject: Win
File "a" contains the list of hostnames:
C:\>type a
one
two
three
Just print the commands we would execute:
C:\>perl -ne "chomp;print qq{exec $_ -u abc -p xxx abc.bat\n}" a
exec \\one -u abc -p xxx abc.bat
exec \\two -u abc -p xxx abc.bat
exec \\three -u abc -p xxx abc.bat
And this time
Larry - I assume you're talking about Basic/Digest Authentication when you
mention username/password below. In this case have a look at:
http://cookbook.soaplite.com/#accessing%20service%20with%20basic%20authentic
ation
(and in case the link above is wrapped: go to http://cookbook.soaplite.com/
a
It's part of the libwww-perl bundle. try:
ppm install libwww-perl
Hope this helps
Tobias
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Peter A. Peterson II
> Sent: Wednesday, September 10, 2003 3:18 PM
> To: [EMAIL PROTECTED]
> Sub
I trying to find a solution for a problem that involves "long" filenames
under windows 2k/xp. This script:
use strict;
use Win32;
$|++;
testfiles(250,300);
sub testfiles {
my($lower,$upper)[EMAIL PROTECTED];
for my $i ($lower..$upper) {
print "checking filename length of $i\n";
[for some reason my mails seem to get lost out there - this is a resend of
an earlier attempt (3hrs ago) - apologies if you receive this twice -
tobias]
I trying to find a solution for a problem that involves "long" filenames
under windows 2k/xp. This script:
use strict;
use Win32;
$|++;
testfi
What happens if you do this instead:
$GET_ARU_FAILURES = <<"EOU";
(yes, the equal sign is missing).
And, you're not doing any interpolation in the here-doc, so you might as
well write:
$GET_ARU_FAILURES = <<'EOU';
and save yourself from writing those "\" over and over again.
What about:
foreach my $sheet (1,2,4) {
print "\$sheet = $sheet\n";
}
Tobias
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Beckett Richard-qswi266
> Sent: Friday, July 18, 2003 6:57 AM
> To: '[EMAIL PROTECTED]'
> Sub
C:\tmp>type in.txt
31563;qualified;REMUS;IPR;05/11/2002;REMUS 6.30;-Bouygtel/REMUS/Instance -
Paiement/Rechargements/ppc_tools;W_REM_QUA
31617;standby;DIAMANT-SIEBEL;IPR;06/11/2002;DIASBL
1.1;-Bouygtel/DIAMANT-SIEBEL;W_DIASBL_MOE
31646;entered;Fraude;HLP;06/11/2002;GEOLE 2.5.1;-Bouygtel/Fraude/FRD
perl -MWin32 -e "print Win32::GetShortPathName(qq{C:\\Program Files\\Active
Perl\\}),qq{\n};"
Hope this helps
Tobias
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of [EMAIL PROTECTED]
> Sent: Wednesday, July 16, 2003 9:33 AM
> To: [EMAIL PROTEC
[I sent this yesterday afternoon, but it never appeared on the list - wonder
why?]
perl -MPOSIX -e '$o=6-(localtime())[6]; print strftime("%m/%d/%Y
%A\n",localtime(time+($o+$_)*24*60*60)) for(0..13);
Hope this helps
Tobias
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL
This may help: http://techdocs.postgresql.org/techdocs/updatingcolumns.php
Tobias
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Lori
> Sent: Wednesday, July 02, 2003 4:21 PM
> To: [EMAIL PROTECTED]
> Subject: postgresql
>
>
> I know this is
Try:
select left(Data,3) as start, count(*) as occurances from table group by
start;
Hope this helps
Tobias
PS: Tried this on mysql ...
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of steve silvers
> Sent: Friday, June 27, 2003 7:52 AM
>
print STDOUT join(qq{\n},@array),qq{\n};
should do it.
Hope this helps
Tobias
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of George
Gallen
Sent: Thursday, June 12, 2003 2:46 PM
To: [EMAIL PROTECTED]
Subject: Reverse of Chomp...
Is there a way to rev
At 09:54 AM 4/3/2003 -0500, Eric Logeson wrote:
I did read that many times...
(http://aspn.activestate.com/ASPN/Perl/Reference/Products/PDK/PerlSvc/What.html)
from what I gather I need to specify:
$Config{UserName} = 'test';
$Config{Password} = 'test';
which I did, but upon compilation I get the f
At 09:18 AM 4/3/2003 -0500, Eric Logeson wrote:
Hello
How do I specify an account that the service should log on as?
Open the PDK Help and read under PerlSvc->"What is PerlSvc?". Hint: Search
for UserName.
Tobias
___
Perl-Win32-Users mailing list
[EMA
At 10:28 AM 3/20/2003 -0500, you wrote:
Filename = "Base-02.04.1.20.5.002-xlite_katana_free.ndu";
I want to get extension of the file name which is ndu, but I always get
04.1.20.5.002-xlite_katana_free.ndu instead of ndu.
The sub is like:
sub extension
{
my $path = shift;
my $ext
At 11:41 AM 3/10/2003 -0600, Andrew Mansfield wrote:
I want to match files that have no period in their filename.
use strict;
use warnings;
my $start_dir = $ARGV[0] || ".";
use File::Find;
print "Temp file list:\n";
find sub {
return unless -f;
my $file=$File::Find::name;
print "$
At 02:17 PM 3/7/2003 +, steve silvers wrote:
Does anyone know where I can find some good "useable" documentation on
setting up HTML::Mason and mod perl on windows with Apache? I installed
both via ppm and that went good, but im having trouble adding the needed
lines to the httpd.conf file..
At 01:14 PM 3/6/2003 -0600, Mohammad Hassan wrote:
Hi,
i am sorry if this question is too trivial. i was trying to automate the
selectall-copy-paste sequence in internet explorer. i open a webpage in IE
and then select all the contents of the page , copy them and paste it in
the notepad and save it
At 11:27 PM 3/3/2003 +, [EMAIL PROTECTED] wrote:
I don't know anything about RPC::XML but you may be witnessing the explicit
EOF character that DOS *sometimes* appends to a text file when it closes it.
This is most easily seen using the copy "+" syntax.
D:\TEMP>copy con hello.txt
Hello
^Z
At 01:24 PM 2/28/2003 -0800, Jer wrote:
Hi All
Thanks for all your help so far.
I have a problem. I can't seem to fork() more than 64 times.
I found this info from the perl list archive:
"Yes, the number of threads in Perl on Windows is limited to 64. This is
mostly due to the fact that the Win3
69 matches
Mail list logo