Re: Template Toolkit on Windows 7

2012-07-11 Thread Arms, Mike
Dennis Daupert [ddaup...@csc.com] wrote: > > Run the script or cmd as admin (right click on the command icon, > > select run as admin) would probably help > > This is a Perl script, configure.pl, no command icon to click on. > Is there another way I can run it as admin? > > best, > > /dennis M

RE: win32 and modifying a file

2012-06-07 Thread Arms, Mike
> -Original Message- > From: perl-win32-users-boun...@listserv.activestate.com [mailto:perl- > win32-users-boun...@listserv.activestate.com] On Behalf Of Greg Aiken > Sent: Thursday, June 07, 2012 4:08 PM > To: Perl-Win32-Users@listserv.activestate.com > Subject: [EXTERNAL] win32 and modify

RE: Help with file redirect

2011-07-05 Thread Arms, Mike
http://search.cpan.org/~kenshan/IO-Tee-0.64/Tee.pm Think you can use this module to do exactly what you want. - Mike Arms -Original Message- From: perl-win32-users-boun...@listserv.activestate.com [mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of Barry Brevik Sen

PPD for two modules?

2011-03-07 Thread Arms, Mike
Hi, all. I am looking for PPD's for the following two modules compiled for ActivePerl v5.12.3: String-CRC (v1.0) - note: NOT String-CRC32 Time-modules(v2006.0814) I did not find them under the ActiveState, bribes, trouchelle, or uwinnipeg repositories. Anyone have a PPD sourc

RE: Iffor

2006-04-19 Thread Arms, Mike
Bill Ng [bill.ng AT citigroup.com] wrote: > Thanks, > > Just ordered it from Amazon. Went the super-cheap route and ordered > it free shipping ... should have it in a week or so. > > If anyone cares, I ended up using this as my code ... it accomplished > exactly what I was looking for: >

RE: Iffor

2006-04-18 Thread Arms, Mike
Bill Ng [bill.ng AT citigroup.com] wrote: > Syntax issue (I think), > > I'm trying to do the following: > I need to execute a block of instructions for all items in an array > except for one. > > So if my array was: > @a=(1,2,3,4,5); > And we assume that I don't want to execute the block if the v

RE: Replace Leading Spaces

2006-04-07 Thread Arms, Mike
Dirk Bremer [Dirk.Bremer AT nisc.coop] wrote: > Using a regex, I want to replace each leading space-character with a > corresponding zero-character on a one-to-one basis. For an example > string: > > my $string = ' 259.00 '; > > Note that I don't want to change the trailing space character.

RE: Which LWP?

2006-02-10 Thread Arms, Mike
Gisle Aas [gisle AT ActiveState.com] wrote: >Mike Arms [marms AT sandia.gov] wrote: >> And as Rob (Sisyphus) said, you have to use different quoting >> mechanisms under Unix versus Win32 shells > > A command line that works both on Unix and Windows shells is this one: > > perl "-MLWP 99" Isn't

RE: Which LWP?

2006-02-10 Thread Arms, Mike
elps. -- Mike Arms -Original Message- From: Jerry Kassebaum [mailto:[EMAIL PROTECTED] Sent: Thursday, February 09, 2006 6:04 PM To: Arms, Mike Cc: perl-win32-users@listserv.ActiveState.com Subject: RE: Which LWP? Mike, First, thanks! Second

RE: comparing floating point numbers

2005-07-25 Thread Arms, Mike
Ed Chester <[EMAIL PROTECTED]> wrote: > just a warning to be careful of subtracting or dividing similar numbers in > floating point and what your expectations are for the results. google for > 'catastrophic loss of precision' or similar, or check out the floating point > standard (IEEE #754) for

RE: How do I compare and get difference of two arrays

2005-02-25 Thread Arms, Mike
Sasi Kiran Kumar Mungamuru wrote: > How Do I compare and get difference of two arrays as my > both arrays carries scalar values and my output should be > stored to another array. In addition to the excellent responses by $Bill and others I would add that I use Mark-Jason Dominus' excellent modul

RE: perlctrl and cygwin - using cygwin development tools with pdk

2005-02-15 Thread Arms, Mike
wagnerc AT plebeian DOT com wrote: > Edward Peschko (esp5 AT pge DOT com) wrote: > >However, when I try this, I get: > > No perl found at C:\perl\bin\perl.exe > > > >even though there *is* a perl found at C:\perl\bin\perl.exe > > /cygdrive/c/perl/bin/perl.exe > > Cygwin retains Unix's distast

RE: Using regular expressions to replace file text?

2004-12-22 Thread Arms, Mike
[Decided to top-post this time since Matt is.] Under Win32, you need to set binmode() on binary files: my $file = 'myImage.jpg'; # Opening binary file for read & write. open( IMAGE, "+<$file" ) or die "*** Trouble opening '$file' : $!\n"; binmode( IMAGE ); I would caution you though that

RE: Using regular expressions to replace file text?

2004-12-22 Thread Arms, Mike
me pass *.*? > > I seem to remember a reference to a way to tell it to work on multiple > files from the cmd-line but can't seem to find the forum post any > longer. > > Something like -file (name=*.*)? Or something... > > -matt > mharp AT seapine DOT com > &

RE: Using regular expressions to replace file text?

2004-12-22 Thread Arms, Mike
Matt Harp wrote: > This has to be an easy question to answer, but I've been > looking and hacking for a day now and can't figure it out. > > I want to just do search/replace on a set of files using > regular expressions. > > I have ActiveState 5.8.6 installed on WinXP, if that matters. > >

RE: numeric vs string scalars...difference?

2004-11-16 Thread Arms, Mike
Paul Rogers [perl-users AT coservers DOTnet] wrote: > I need to dynamically do comparisons tests on an array of > values...some strings, some numeric. One snag I hit is > comparing the occasional numeric values. Using "eq" as > the comparison operator fails on comparisons like > "45.0" vs "45".

RE: simple regex question

2004-10-15 Thread Arms, Mike
Works for me. Might I suggest adding simple debugging print statements before and after your match: print "foo='$foo'\n"; $foo =~ /([^.]+).txt/; $ans = $1; print "ans='$ans'\n"; Maybe $foo doesn't contain what you think it does. Also, a nitpick, but you did not include the semicolons whi

RE: The old \015 problem

2004-10-07 Thread Arms, Mike
Title: RE: The old \015 problem David D Miller [ddmiller AT raytheon DOT com] wrote: >I just copied (using ftp in binary mode) my perl scripts from DOS >to Unix and got caught on the carriage return problem:  When I >try to executethe DOS scipt in Unix, I get the following > >[mdscom]/

RE: Trouble printing a field

2004-10-07 Thread Arms, Mike
Gary Kuznitz [EMAIL PROTECTED] wrote: > I'd like to print what is in %BlaklistedIPs. Could somone please > let me know what am I doing wrong? > > my %BlacklistedIPs = map +( $_, 1 ), split (/\\e/, $cli->GetBlacklistedIPs()); > print "\%BlacklistedIPs from server = \n %BlacklistedIPs"; If you

RE: array size confusion

2004-09-17 Thread Arms, Mike
One thing that I would suggest. If you are getting data from a source that uses CRLF for its line endings while running your Perl script on a machine that just uses LF for line endings (whew!), then you may need to add one line after the "chomp" to strip off the CR: while (){ chomp; s/\r

RE: Request: howto install GD.pm using ppm on 5.8?

2004-09-09 Thread Arms, Mike
step 3 profit :-) -- Mike Arms -Original Message- From: Michael 'topdog' Thompson [mailto:[EMAIL PROTECTED] Sent: Thursday, September 09, 2004 11:40 AM To: [EMAIL PROTECTED] Subject: Request: howto install GD.pm using ppm on 5.8? hi , step 1 is ppm step 2 is install GD step 3 is ??

RE: Chop!

2004-06-18 Thread Arms, Mike
Suchindra Sandhu [EMAIL PROTECTED] wrote: > Suppose I have a string like > $sequence = [sas]; > How can I get rid of the leading and trailing brackets and just have > $sequence = sas; > > One way I thought of was : > chop($sequence); > reverse($sequence); > chop($sequence); > reverse($sequence);

RE: Convert .bat files to .com

2004-06-11 Thread Arms, Mike
[EMAIL PROTECTED] [EMAIL PROTECTED] writes: > Actually I need to convert all .bat files to .exe files.. It has to be asked: "Why?" I'm at a loss to see the reasons behind the percieved need for such an action. By the way, not all .BAT actions could successfully be done via compiled code (EXE or

RE: named hash inside of hash

2004-06-08 Thread Arms, Mike
Look up "autovivification": http://www.google.com/search?hl=en&lr=&ie=ISO-8859-1&q=perl+autovivification &btnG=Search Just part of the power of Perl. -- Mike Arms > -Original Message- > From: Matt Bazan [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 08, 2004 4:51 PM > To: [EMAIL PRO

RE: quirky question....

2004-06-07 Thread Arms, Mike
bruce [mailto:[EMAIL PROTECTED] > > i have a simple/quirky question. i have a url --> > http://www.acs.rutgers.edu:8880/pls/sc_p/sc_display.select_maj > or. i can get > to this page by doing a submit from > ==>http://clue.rutgers.edu:8880/sc_pn/plsql/sc_display.main. > > however, when i try to si

RE: undef example

2004-05-07 Thread Arms, Mike
$Bill Luebkert [EMAIL PROTECTED] wrote: > Using the & will disable the use of prototypes. You > should naturally pre-declare your subs that use prototypes. Doh! (Note to self: wait a little while longer before replying as often all will be made clear.) I actually did remember this back in the t

RE: undef example

2004-05-07 Thread Arms, Mike
Sorry for the top posting, but I don't feel like manually massaging the thread. Hold on, Dave, before you stop using "&" on subroutines and prototypes, I'd like to hear Rob's explanation for both of his claims. This is the first I have ever heard from one of the regulars here on this mailing list

RE: shifting bits

2004-03-29 Thread Arms, Mike
This combined with this quote from Anton: I'm trying to avoid people looking at the data without proper access sounds like he is wanting to do some really simplistic encryption of his data that will be stored in a database accessible by others. Anton, this will be incredibly easy to decipher. M

RE: searching for ppms

2004-03-01 Thread Arms, Mike
I have to agree on the reducing down to 2 columns. My sceeen is set at 1280x1024 and the page is still too wide. Two columns would fit just fine. By the way, for those of you who use Mozilla, here is a "keymark" for using Randy's search to search CPAN modules directly from your location bar.

RE: TK question - resizeable columns

2004-02-23 Thread Arms, Mike
y > ',0,'-rows > ',8,'-colstretchmode','last','-rowtagcommand','CODE(0x2ef2d50) > ',...) called > at C > :/Perl/site/lib/Tk/Widget.pm line 1201 > > Tk::Widget::Scrolled('MainWindow=HASH(0x2f13e98)','TableMatr

RE: Net::SSH::Perl

2004-02-10 Thread Arms, Mike
Derek Jones [EMAIL PROTECTED] wrote: > John Ramsden [EMAIL PROTECTED] wrote: > > Just out of curiosity, in what sense did you find Math::Pari > > a PoC? > > > > Did you have trouble building it? I did a quick web search, > > and saw a couple of plaintive posts by people having trouble > > building

RE: build perl 5.8.1 with gcc-3.3.1 w32api-2.4 and dmake-4.1pl1-w in32

2003-12-23 Thread Arms, Mike
Sisyphus [EMAIL PROTECTED] wrote: > Ken Cornetet wrote: > > You will not be able to use modules containing compiled code without > > compiling them yourself. > > Actually, any of the ActiveState ppm's that I've installed on my > mingw-built perl have worked fine. I've also installed mingw-built

RE: seek parameters

2003-12-16 Thread Arms, Mike
Well, I could see a possibility here, but this is total speculation as I do not know the underlying implentation of the sysseek function. Think of the case of function prototypes: sub f (\@) { print 'foo'; } my @a = qw(b c d e f z); f( @a[-2,-3,-1] ); I get this error: Type of arg 1 to

RE: Perl commands and Proxy servers (DPR#67741)

2003-12-12 Thread Arms, Mike
Assuming that you are able to get throught the proxy using your browser, then we should focus on the name of the environment variable and the value set for it. On both my windows sytem and my Unix (solaris) system, I use: http_proxy=http://myproxy.domain.foo:80 You will need to set replace "myp

RE: Seemingly simple???

2003-12-10 Thread Arms, Mike
Try the Linux command: dos2unix -- Mike Arms > -Original Message- > From: Maraglia, Dominicx [mailto:[EMAIL PROTECTED] > Sent: Wednesday, December 10, 2003 11:07 AM > To: [EMAIL PROTECTED] > Subject: Seemingly simple??? > > > Hello, > > I have a small problem, which at first seems sim

RE: just installed ActivePerl on my win98 - what's next

2003-11-25 Thread Arms, Mike
Ted, you coding logic is faulty. Here is a much more compact way to write it right way. :-) my @adj = qw( totally really truly awesomely ); my @verb = qw( rules rocks dominates ); for my $y (0..20) # No need to loop 500 times :-) { print "ViM"; print ' ', ( $_ < $y ? $adj[int(rand @adj)]

RE: RegEx to remove \x0D\x0A

2003-10-01 Thread Arms, Mike
Got it (I think). Just add this after you open the file and before the read. binmode( FILE ); My tests on my machine agreed with you. -- Mike Arms > -Original Message- > From: Bullock, Howard A. [mailto:[EMAIL PROTECTED] > Sent: Wednesday, October 01, 2003 12:17 PM &g

RE: RegEx to remove \x0D\x0A

2003-10-01 Thread Arms, Mike
Bullock, Howard A. [EMAIL PROTECTED] wrote: > My script slurps in a file > > Local $/; > $data = ; > > and want to remove the CRLF's. but even a simple RegEx match does not > succeed for me. > > These all have failed. > > print "\nYES\n" if $data =~ /\015\012/; > print "\nYES\n" if $data =~ /\

RE: *nix or Windows Text Files?

2003-09-30 Thread Arms, Mike
Hanson, Rob [EMAIL PROTECTED] wrote: > If you want the same line endings under *nix and Windows you could > explicitly state the line ending: > > my $NL = "\x0A"; # ascii 10 in hex > print "The end is near$NL"; > > \n will use the system default. Not true. On a Win32 system, the above will pridu

RE: 'which' functionality in Perl

2003-09-30 Thread 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 full path to the file. > > The functionality I want is similar to 'which' on Unix/Linux. Dax,

RE: The Unofficial Perl Win32 Users Flameware/Mega-Thread FAQ

2003-09-23 Thread Arms, Mike
Michael D. Smith [EMAIL PROTECTED] wrote: > You will recall the current mega-thread started not with a > question but a mention of "it" in jest. I hesitate to say > "it" for obvious reason but since everyone knows what "it" > means, that may not matter. We may all be doomed to lifetime > filled w

RE: newbie hlelp!

2003-09-18 Thread Arms, Mike
Lee Goddard ([EMAIL PROTECTED]) wrote: > How about: > >() - plain/round parenthesis/brackets >[] - square parenthesis/brackets >{} - curly parenthesis/brackets, set delimiters (maybe not) ><> - angle brackets; greater-/less-than > > Really, though, bull aside, do you Yankees reall

RE: newbie hlelp!

2003-09-16 Thread Arms, Mike
Lee Goddard ([EMAIL PROTECTED]) wrote: > opendir opens a directory so the contents can be listed. > utime changes the modification times associated with the file. > stat will give you the last modified time (as will -M). > > warn -M $file; > warn ((stat ($file))[9]) Trevor Joerges ([EMAIL PROTEC

RE: Rename hash keys

2003-09-04 Thread Arms, Mike
Gerard ter Haar ([EMAIL PROTECTED]) wrote: > I have a hash related question. Thanks in advance for your assistance! > > I have quite a large number of values in a hash: > > $errs->{ err_main_notfound } = "file not found. check config."; > $errs->{ err_main_perms } = "no permissions, check docs".;

RE: Regex Help Needed

2003-09-02 Thread Arms, Mike
It looks like you may be doing standard command line option parsing (or almost standard as the '--' prefix is reserved for long option names). If this is so, look at GetOpt::Std . For a subroutine that does what you specified (tested): sub is_DTG_Option ($) { my $opt = shift; return 0

RE: Environment variables on Win98

2003-08-18 Thread Arms, Mike
=> { 1 => 'Windows Me' }, }, 5 => { 0 => { 2 => 'Windows 2000' }, 1 => { 2 => 'Windows XP' }, 2 => { 2 => 'Windows Server 2003' }, }, ); -- Mike Arms > -Original Message----- > F

RE: mulitple graphs on one web page.

2003-08-05 Thread Arms, Mike
Mitch Raful ([EMAIL PROTECTED]) writes: >If you look at my code below you will see I have created two >graphs from files. How can I print both graphs on the same >web page??? The question is: "Do you know HTML?" I am not trying to be sarcastic here. This is primarily an HTML question (not Perl

RE: Hash tables where keys names would not be stored

2002-11-06 Thread Arms, Mike
My first question is why not store the full URL in your hash? Is this optimization of memory really important? I can see it would be important if you are storing over 100,000 URLs, but this seems unlikely. If the optimization is really needed and if all of the URLs have a common base, then you co

RE: Regular Expression Help

2002-06-10 Thread Arms, Mike
>PS I have learned something from this post, I didn't know you could >define a string using brackets as you have done... Except that what you learned: $a = (12345678904539); is a bad practise. It is a novice mistake. What is being done here is an anonymous list has been created with one elem

RE: How Perl Helped Find My Missing Gigabyte

2002-04-05 Thread Arms, Mike
For those who have the GNU Unix 'find' command (I use Cygwin), you can just do this: find YourDirList -type f -size +100c -printf '%s %p\n' | sort -n This will find any files 1,000,000 bytes or larger and list them with their sizes in numerically ascending order. Lots of power in GNU Unix