On 1/24/2013 9:36 AM, Paul Rousseau wrote:
Hello Perl forum.
I am attempting to parse a file that contains a format I am not
familiar with. I read in a record and assign it to $string.
$string = N o r m a n d v i l l e A d m i n
When I dump the string using this code,
while ($string =~
On 9/18/2011 9:38 PM, Jer A wrote:
All,
lets say i want to test if a string contains pig but not dog
and/or not cat
i tried something like this:
=~ m/[^dog]|[^cat]|pig/ig
what is the best way of going about this, using one regex?
your help is very much appreciated,
perhaps the
On 3/3/2011 4:07 PM, Greg Aiken wrote:
im wanting to write a simple perl 'filter' program in windows.
I basically took the base code found here...
http://www.techrepublic.com/blog/programming-and-development/simple-filters-in-perl-ruby-and-bourne-shell/3481
the sample here is simple, convert
On approximately 11/22/2009 11:48 PM, came the following characters from
the keyboard of Daniel Burgaud:
Hi,
Does TK have image Crop functionality?
The reason why I wanted to use BMP is it's simple format..
What I need in my final code is to show in a small label widget a
small portion of
On approximately 11/22/2009 3:56 AM, came the following characters from
the keyboard of Daniel Burgaud:
Hi
PerlTK's Photo does not accept bmp format.
$mw-Photo('image1', -file = screen.bmp , -format=bmp);
$frames{'XX'}-configure( -image = 'image1' );
screen.bmp is a screen capture created
On approximately 9/7/2009 1:17 PM, came the following characters from
the keyboard of Jares, Howard M:
I need to calculate the password expiration date for users in Active
Directory.
This is basically done by obtaining the domain maxPwdAge which is a 64
bit value that represents how
So I open a workbook with macros, and then another workbook with data,
and run A_macro... as follows...
require Win32::OLE;
require Win32::OLE::Const;
Win32::OLE::Const-Load('Microsoft Excel');
$Win32::OLE::Warn = 3;
$Win32::OLE::Warn = 3;
my $Excel =
On approximately 10/24/2004 4:06 PM, came the following characters from
the keyboard of MJG:
For those of you that are big fans of this, I see value in using it.
How would I set this situation up:
$List{$key}=...code
Do I do this
my $List = ''; my $key = '';
This doesn't seem to make sense
Given:
In GFfP.pm:
our $VERSION = '0.1';
Later in a script:
use GFfP;
print GFfP::VERSION: $GFfP::VERSION -- , $GFfP::VERSION + 0, -- ,
( $GFfP::VERSION = 0.1 ), \n;
Why do I get the output:
GFfP::VERSION: 0.1 -- 0 -- 1
I would have expected something similar to:
On approximately 10/20/2004 6:24 PM, came the following characters from
the keyboard of Sisyphus:
Glenn Linderman wrote:
Given:
In GFfP.pm:
our $VERSION = '0.1';
Later in a script:
use GFfP;
print GFfP::VERSION: $GFfP::VERSION -- , $GFfP::VERSION + 0, -- ,
( $GFfP::VERSION
On approximately 10/20/2004 7:26 PM, came the following characters from
the keyboard of Sisyphus:
Glenn Linderman wrote:
There's not much more. GFfP.pm is just a placeholder for a bunch of
XS code. Here is the module in its entirety (except for the leading
comments).
package GFfP;
use
On approximately 10/8/2004 9:16 AM, came the following characters from
the keyboard of [EMAIL PROTECTED]:
Thanks for the info. This ist great! I've installed that thing, but somehow
I can't figure out how this NEM-Event-Handler-thing works. I googled for
it, but didn't find an example.
This is a
I have the following code:
my $ftype;
{ my $assoc = `assoc .html`;
$assoc =~ [EMAIL PROTECTED]@@;
print assoc: $assoc\n;
$ftype = `ftype $assoc`;
$ftype =~ [EMAIL PROTECTED]@@; ## this line is referred to below
print ftype: $ftype\n;
}
On approximately 9/24/2004 11:53 PM, came the following characters from
the keyboard of Glenn Linderman:
I have the following code:
my $ftype;
{ my $assoc = `assoc .html`;
$assoc =~ [EMAIL PROTECTED]@@;
print assoc: $assoc\n;
$ftype = `ftype $assoc
On approximately 9/25/2004 12:30 AM, came the following characters from
the keyboard of $Bill Luebkert:
Glenn Linderman wrote:
I have the following code:
my $ftype;
{ my $assoc = `assoc .html`;
$assoc =~ [EMAIL PROTECTED]@@;
print assoc: $assoc\n;
$ftype
On approximately 8/26/2004 1:42 AM, came the following characters from
the keyboard of $Bill Luebkert:
Charles K. Clarkson wrote:
There are two problems with the hash solutions.
One, the original order is lost. And two, they assume
at least one array contains only unique values.
You're
On approximately 8/26/2004 2:36 PM, came the following characters from
the keyboard of $Bill Luebkert:
Glenn Linderman wrote:
On approximately 8/26/2004 1:42 AM, came the following characters from
the keyboard of $Bill Luebkert:
You're correct on two (if indeed the values aren't unique
On approximately 8/13/2004 9:47 AM, came the following characters from
the keyboard of Craig Cardimon:
I need to take capped section headings and change them into initial or
tital case. I have coding that does this.
However, my logic also changes acronym names such as IBM and PDF into
Ibm and
use strict;
use warnings;
#
sub hexdump
{ return ( ': 33 33 33 33 33 33 33 33 ' . \n );
}
#
my $fh = *STDOUT;
print '' . hexdump ();
print hexdump ();
print $fh '' . hexdump ();
print $fh hexdump ();
So what doesn't the list manager simply make Out of Office a forbidden
sequence in a subject or body, and trash such emails? That would cut
the autoreplies at least by 2/3rds.
I could certainly live with that restriction and it seems you can't
teach people how to do it right, just like
On approximately 7/18/2004 1:19 AM, came the following characters from
the keyboard of $Bill Luebkert:
Randy W. Sims wrote:
Bonus round:
In addition to what I said in my previous post, a '+' can be used
sometimes to disambiguate certain types of expressions. In this case,
the results can vary
On approximately 7/18/2004 9:09 AM, came the following characters from
the keyboard of joe:
Having the autoresponder Randy has set up to respond to OOO messages respond
directly back to the user instead of the user and the list may possibly
reduce it by another 1/3. :o)
It _may_, _eventually_, but
On approximately 7/18/2004 10:26 AM, came the following characters from
the keyboard of Tobias Hoellrich:
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
So, other than programming style (the code below is excerpted down to a
small test case, so looks gross), what did I do wrong?
Supply your own non-empty file name for mine in $name below (please
don't tell me I don't need double backslashes inside single quotes, that
isn't the problem), and
On approximately 6/18/2004 11:26 PM, came the following characters from
the keyboard of Ewa Konieczynska:
Hi All,
I've lost all messages sent to this mailing list since 28.04.2004.
Could you send them to my address, please?
Regards,
Ewa Konieczynska
[EMAIL PROTECTED]
What do you think, folks?
On approximately 5/13/2004 6:09 AM, came the following characters from
the keyboard of Dirk Bremer (NISC):
Hi,
I have a need to create a small app for our support organization which
primarily uses Windoze to do their day to day tasks. Since they are
not that command line savy I'd like to put
On approximately 5/12/2004 10:17 PM, came the following characters from
the keyboard of $Bill Luebkert:
Glenn Linderman wrote:
On approximately 5/12/2004 7:53 PM, came the following characters from
the keyboard of $Bill Luebkert:
use Win32::GUI;
my $file = Win32::GUI::GetOpenFileName
On approximately 5/13/2004 9:48 AM, came the following characters from
the keyboard of $Bill Luebkert:
Well, the return value is different than you might have otherwise expected.
When I turn on -multisel = 1, it produces a different dialog box, and
returns a space separated list of values, first
On approximately 5/13/2004 5:41 PM, came the following characters from
the keyboard of Valerie Kramer:
On 0.0.671, -explorer = 1 seems to be the default. Inserting the line or
commenting it out made no difference. I got the modern widget.
Setting -explorer = 0 gave me the crufty version.
I
On approximately 4/12/2004 3:04 PM, came the following characters from
the keyboard of POWELL, JAIME M. (JSC-IS) (IDI):
This is probably a silly question, but does the BrowseForFolder command work
from a browser?
Well, it depends on what you mean by work from a browser :)
If your browser is
For sorted lists of text, like dictionaries, one quick-to-decode
technique that saves a fair amount of space, is to start each string
with the number of bytes that match the previous string, and then append
the remainder of the string.
In other words, the list of words
though
thought
On approximately 3/25/2004 9:16 PM, came the following characters from
the keyboard of Randy W. Sims:
On 3/25/2004 11:50 PM, Glenn Linderman wrote:
For sorted lists of text, like dictionaries, one quick-to-decode
technique that saves a fair amount of space, is to start each string
(with 800x800 geometry)
Any more effective compression?
- Original Message -
From: Glenn Linderman [EMAIL PROTECTED]
To: John [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, February 24, 2004 10:24 PM
Subject: Re: compress and convert a bmp
Sure, use Image::Magick
On approximately 2
Kev is correct, but the bug he refers to is only on WinNT 4.x
On approximately 2/23/2004 9:58 AM, came the following characters from
the keyboard of Kevin Hill:
Guys,
My understanding is that there is a bug in the file extension/application to execute code, that is part of windows, that stops
On approximately 1/12/2004 8:36 PM, came the following characters from
the keyboard of Jamie Murray:
Hey Alex,
I jumped a little quick there, the previous post does work but I had a doh
moment and forgot your upper range match could only be 254 at most.
Sorry about that.
if($num =~
On approximately 1/13/2004 6:49 AM, came the following characters from
the keyboard of Jamie Murray:
Hi guys,
I have seen my error which I have overlooked and don't mind admitting it.
: ) Course don't hold it against me cause I'm just eager to learn
and try things out.
My regex works it matches
: Glenn Linderman [EMAIL PROTECTED]
To: Jamie Murray [EMAIL PROTECTED]
Cc: $Bill Luebkert [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Tuesday, January 13, 2004 6:24 PM
Subject: Re: REGEX help!
On approximately 1/13/2004 6:49 AM, came the following characters from
the keyboard of Jamie Murray:
Hi
On approximately 1/11/2004 9:28 PM, came the following characters from
the keyboard of [EMAIL PROTECTED]:
Hello,
Monday, January 12, 2004, 4:01:38 AM, you wrote:
GL Since (except for the German) that all looks very much like my working
GL links for non-PAR code, I'd say that the problem is not
solution.
$newdata = decode(utf16be, $mydata);
print $newdata.\n;
}
close RESOLV;
-Original Message-
From: Glenn Linderman [mailto:[EMAIL PROTECTED]
Sent: 31 December 2003 08:28
To: Sisyphus
Cc: Tom Roos; [EMAIL PROTECTED]
Subject: Re: newbie: foreign characters
On approximately
Hi,
I'm writing a program that needs single character input from the console
window. So Term::ReadKey seems to be a natural solution.
So I wrote some perl code as follows. Usually the program asks for a
key, and gets it. Sometimes it wants to check for the existance of a
keypress without
I guess I'm missing something very basic about Win32::SerialPort. The
following one-line demonstrates my travail:
perl -MWin32::SerialPort -e new Win32::SerialPort 'COM1'
It results in Access is denied. Is there some sort of security
somewhere in Windows, that would prevent an administrator
Prelude:
Using Perl 5.8.0 ActiveState build 805 on Windows 2000 SP4
I have this script that is 1.2 MB long rather than post the whole
thing, I've made a test case... surprisingly I was able to get it down
to 60 lines. I guess it could have even been a little smaller...
So I'm writing an
On approximately 11/22/2003 5:51 PM, came the following characters from
the keyboard of $Bill Luebkert:
Glenn Linderman wrote:
Prelude:
Using Perl 5.8.0 ActiveState build 805 on Windows 2000 SP4
I have this script that is 1.2 MB long rather than post the whole
thing, I've made a test case
On approximately 11/22/2003 6:21 PM, came the following characters from
the keyboard of $Bill Luebkert:
Glenn Linderman wrote:
Should it work as is? If not, why not? I can't find any documented
reason why it shouldn't work, and I do find references in Camel that
imply that eval'd code
The filehandle CAN be a variable... introduced in Perl 5.6? Or was it 5.8?
sub bin_urls {
foreach (@alpha) {
$temp = $_.out;
open ($fh, $temp);
print $fh Delete the file and replace it with this line;
close($fh);
}
}
This was likely added to Perl due to the
The reason 25 works is that your locally installed SMTP host is
listening on port 25 (probably). The port has to be configured the same
on both ends of a connection... you can kind of think of IP and port
numbers like a business telephone number with an extension. If you want
to reach Mary
On approximately 10/1/2003 4:41 PM, came the following characters from
the keyboard of S Taylor:
Would like to know if Microsoft Access Database records can be manipulated
using ActiveState
Perl 5.8 ? And if so, how?
Appreciate any information provided.
One way that I have used is to use DBI,
On approximately 9/30/2003 11:03 AM, came the following characters from
the keyboard of Arms, Mike:
Dax T. Games [EMAIL PROTECTED] wrote:
How would I determine if a file existed in a directory in the
PATH environment variable on a Windows box with Perl. If the
file exists I want to return the
On approximately 9/30/2003 11:46 AM, came the following characters from
the keyboard of Glenn Linderman:
On approximately 9/30/2003 11:03 AM, came the following characters from
the keyboard of Arms, Mike:
Dax T. Games [EMAIL PROTECTED] wrote:
How would I determine if a file existed in a directory
On approximately 9/25/2003 5:18 PM, came the following characters from
the keyboard of Wong, Danny H.:
Hi all,
I was wondering if I can start adding elements into an array
starting at 1? Here is what I am trying to do. I'm trying to glob all
files/folders in a directory and assign it to an
On approximately 9/25/2003 6:45 AM, came the following characters from
the keyboard of Xu, Qiang (XSSC SGP):
Hi, all:
I have a regular expression that I can't understand.
Suppose $filename is a file name that includes the full path. Say, it is
/u/scan/abc.jpg,
The regular expression is:
On approximately 9/7/2003 8:50 PM, came the following characters from
the keyboard of Shain Edge:
Is there a way in perl to simulate key-presses into
other programs? If so, could someone direct me to a
direction in how to do it?
Shain
Win32::GUITest
--
Glenn -- http://nevcal.com/
On approximately 8/28/2003 2:58 PM, came the following characters from
the keyboard of Chris:
Well, this is a rundown of what is working, but it's slow due to the number
of lines.
- Chris
open (THE_INPUT,/home/filelist.txt) || die can\'t open filelist.log: $!;
while(THE_INPUT) {
chomp;
push
On approximately 8/5/2003 1:56 PM, came the following characters from
the keyboard of Chien-Lung Wu:
Hi,
In the bash, I can test a file or a directory by following:
if [ ! (-f a_filename)]; then
do_something_for_this_file
fi
if [ ! (-d a_dirname)]; then
On approximately 7/18/2003 10:14 AM, came the following characters from
the keyboard of Carl Jolley:
On Fri, 18 Jul 2003, Farrington, Ryan wrote:
Grrr still didn't catch the error =(
-Original Message-
From: Burak G?rsoy [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 1:06
On approximately 6/22/2003 11:16 PM, came the following characters from
the keyboard of Sisyphus:
I have a module (let's call it Mymod) that contains an XS function (let's
call it myfunc). myfunc() takes 3 arguments (integers).
I'll get the exact same warning as you reported if I run the
I asked this on the Win32::GUI list, but no response. Not too many
XS users there, I guess. Maybe this isn't the right place to ask
either. The obvious search terms are too generic to find a practical
tutorial for learning how to debug perl XS on Windows but that is
really what I'm looking
On approximately 3/31/2003 3:07 AM, came the following characters from
the keyboard of Stuart Arnold:
I have all that. I'm trying to use it (I am an old windows hack) to
get some uniquely passed in data.
First, let me start with what I'm trying to do and maybe someone has
a hint.
Given a
On approximately 3/23/2003 5:49 AM, came the following characters from
the keyboard of Oleksandr Pavlyk:
If you wanna do it CGI way, you can send back HTTP header Refresh
$q-header(-Refresh = '1; URL=http://etc.etc.etc/');
Stephen Patterson wrote:
On 22 Mar 03, [EMAIL PROTECTED] ([EMAIL
On approximately 3/23/2003 9:10 PM, came the following characters from
the keyboard of John:
I have this code snippet in a script.
###[code]
my $outfile = shift @ARGV || con;
open DESTINATION, $outfile
or die 'cannot open destination file';
print DESTINATION EOHEAD;
!DOCTYPE HTML PUBLIC
Hi,
I have, over time, figured out the incantations for PPM to set up my
repository list, and I know to search first, then install what was found
to avoid ambiguity. And I know to check the version of the packages
from different repositories.
That's a lot to teach someone that doesn't care a
Randy Kobes wrote:
Essentially what is after here is a way for PPM to map module
names to distribution names. The name used in a ppm package is
derived from the name that the CPAN distribution comes as - in
many cases it happens to be the same (with s/::/-/g) as the name
of the main module in
Thomas R Wyant_III wrote:
Glenn Linderman [EMAIL PROTECTED] wrote:
And my missing feature PPM rant is that it would be nice to be
able to issue PPM commands to prepare a CD containing a collection
of modules and their dependencies to take to an offline machine
(there are places where
Lewis, Chris wrote:
For anyone interested, I've attached a working copy of an NT Event Log
monitoring script, which queries for warnings and errors and sends out an
e-mail notification if any are encountered. The only thing I haven't been
able to get to work is getting the complete text of
Andre Warnier wrote:
Message text written by TC Winquist
I decided to save the image to a temporary image file and then display that
using non-perlmagick methods. It just seems to be an unnecessary step I
shouldn't have to take. It works though, so I guess I'll have to live with
it.
Joseph Youngquist wrote:
Hello all, I got a question about changing the -bitmap= on a button...well
it even applies to a Label to.
I haven't done buttons, but I have done labels...
...Ahh an event has taken place and we must change the image on the
button!...
I have, for some years, used the -x option to bypass cruft at the
beginning of
perl scripts. The long involved reason for this has no place in this
discussion, but it involves the need on certain Unix systems I used, to
invoke perl via a
shell preamble. So I have, at the beginning of most of my
Peter Guzis wrote:
Attempts to fork with Win32::GUI have been unsuccessful for the most part.
I found if I even use Win32::GUI before a fork, Perl will completely crash
when the fork is invoked. The workaround I found is to require Win32::GUI
after any such fork. I'm not sure if this is a
Rubinow, Larry wrote:
Carl Jolley wrote:
More to the point, assurance that the hash element is an array
reference is required in order that the following push
statement will work.
Naw. The next line after the assignment,
push(@{$hash{$symbol}}, $value);
would cause
Scott Campbell wrote:
-style = WS_VSCROLL,
I've heard of -addstyle, which adds to styles, rather than replacement,
which is what -style does. There is also -remstyle, to remove a style.
And -addexstyle, and -remexstyle. Have fun.
--
Glenn
=
Due to the current economic
Good find. Of course, the author's page below indicates that Win32::DUN
is
1) considered obsoleted by Win32::RASE
2) requires the use of an external program to do some of the work
I've been playing with Win32::RASE and also Win32::GUI to make a
flexible
dialer application that a number of my
And if you need to retain the first seen order in the output file, you could
do something like
print $_ unless $texthash{$_};
just before Scott's chomp below (which may or may not be needed).
Purcell, Scott wrote:
I am not an expert here, but why compare each line. Read each line into a
If you get it from STDIN, you probably need to chomp it to get rid of the
trailing newline stuff. as in
print prompt;
chomp ( $dirname = STDIN );
And, per another message, you cannot append to the front of a file, there is
already data at the front of the file, and if you were able to write
Guessing that "sign overstruck numbers" means that the sign of a string
of digits is embedded into the first digit, rather than consuming
an "extra" character position in fixed width fields, then there wouldn't
be a string of them, but a string might have one of them in the
first position.
Actually, it isn't the $i++. It was the $i 501. Particularly, the . Switching to
$i lt '501'
produces the sequence with leading zeros intact.
for ( $i = "001"; $i lt "501"; $i++ )
Cheers!
"$Bill Luebkert" wrote:
Glenn Linderman wrote:
Doesn't he need
75 matches
Mail list logo