Re: Help with subroutine

2011-03-15 Thread Chris Wagner
I think ur notation is what's confusing u. I don't think it's making a copy but it would be better to write the $num construct as: $nums->{$i} = $numbernames[$i]; HTH. At 09:51 AM 3/2/2011 -0800, Barry Brevik wrote: >I have a subroutine to which I want to pass a hash by reference. In the >re

RE: spurious deaths in script execution due to read-only Config?

2011-02-24 Thread Chris Wagner
I see what ur saying but I guess I see nothing wrong with %Config being read only and croaking if touched. At 05:18 PM 2/23/2011 -, Brian Raven wrote: >I do recall 'perldoc perlsub' warning about localising tied hashes & >arrays being broken, and %Config::Config is a tied hash, I believe. >

Re: spurious deaths in script execution due to read-only Config?

2011-02-23 Thread Chris Wagner
It's the standard behavior of Perl. use Data::Dump "pp"; %a = qw/x 1 y 1 z 1/; grep { $_ } $a{bob}; pp %a; ^D ("y", 1, "bob", undef, "x", 1, "z", 1) At 02:18 PM 2/22/2011 +0100, Christian Walde wrote: >On Tue, 22 Feb 2011 13:46:55

Re: spurious deaths in script execution due to read-only Config?

2011-02-22 Thread Chris Wagner
Hi. U can't do that because Perl must autovivify $Config{bar} in order to have a value to put into $_. HTH. At 08:54 PM 2/21/2011 +0100, Christian Walde wrote: > use Config; > # print 1 if $Config{foo}; # enabling this removes the crash > grep { $_ } $Config{bar}; # this crashes

Re: help intercepting STDIO

2010-10-21 Thread Chris Wagner
So what u want to do is read the output from ffmpeg and write it asynchronously to the Tk window? So that u can monitor the process without having to wait for the process to finish. First is there any way to make a Tk window take its input from a file handle? That would be the easy way to go. T

Re: ActiveState - how times have changed

2010-08-26 Thread Chris Jones
Thank you for your comments David. Well, it will inspire those same developers who are marketing their own Windows Perl versions with graphical debuggers and they are willing to help with the setup. But then I would have to use the built in http server and yet another program to learn and tweak

ActiveState - how times have changed

2010-08-23 Thread Chris Jones
Getting a new computer, with a new operating system, is an eye-opener. I thought I would just upgrade my beloved Komodo personal edition to find that Personal is no longer a concept at ActiveState. PDK or Komodo - $295US if you want a graphical debugger for old Perl cgi scripts running on Wi

Re: Use DLL files at Unix server

2010-04-24 Thread Chris Wagner
In that case u should use SETUID. U make a compiled C wrapper that possesses the SETUID bit and does nothing but execute the Perl script. The user runs the wrapper and can't read or execute the real script. The C code is #include int main(int argc, char *argv[]) { execv("PATH", argv);

Re: How to make 2 lines into one

2010-03-11 Thread Chris Wagner
It seems like what u want to do is collapse vertical white space. Is that text file u attached really what u have to work with? This looks like it was generated from a spreadsheet or CSV file of some kind and it would be much easier to deal with that. At 01:11 AM 3/10/2010 -0800, James T. wrote

Re: Perl Regex

2010-02-26 Thread Chris Wagner
It looks like what u want to do is attribute folding. That's when u take a nested XML tag and make it an attribute of an enclosing tag. Ur doing something slightly different which is merging equal depth tags. The right way to do this is with an XML parser. Look into XML::Simple to get started.

Re: HTML Parsing Question

2010-02-05 Thread Chris Wagner
Hi. The big issue is the ignore unknown tag setting. Also the module does not like a missing and . Also this isn't HTML. U might be better served by using XML::Simple. Printf is ur friend. use HTML::TreeBuilder; $html = ' . '; $tree = HTML::TreeBuilder->new(); $tree->ignore_u

Re: Help with Win32::Input

2010-02-05 Thread Chris Wagner
I would use Term::ReadKey to to do non blocking reads in this situation. It even accepts drag and drop file names while in the background. At 04:21 PM 2/5/2010 -0800, Barry Brevik wrote: >I am writing an app that continously loops looking for files to appear >in a certain directory, and when the

RE: inconsistent behavior using perl.exe via 'Send To'

2009-12-11 Thread Chris Wagner
AS has a built in utility called pl2bat for converting Perl scripts to batch files. It should work out of the box. At 08:48 AM 12/10/2009 -0800, gai...@visioninfosoft.com wrote: >in bat form, the bat file would need to look something like >start "window title" c:\perl\bin\perl.exe c:\script.pl

Re: Net::cmd and dialog

2009-12-09 Thread Chris Wagner
U should use the DumpLog constructor option. That captures a raw log of the communication so u can see what is actually being sent and received. I've had to refer to it numerous times to get my statements working. At 05:48 PM 11/30/2009 -0800, James T. wrote: >Hi all, > >Is there a way to run a

Re: inconsistent behavior using perl.exe via 'Send To'

2009-12-09 Thread Chris Wagner
I would try wrapping the functionality in a batch file. At 02:23 PM 12/9/2009 -0800, gai...@visioninfosoft.com wrote: >I have two computers. one is XP pro, the other XP home. likely there are >some 'non-standard' softwares installed to the xp home system (this is not >my own pc, so im less fami

Re: Resolve hostname by specified nameserver

2009-10-24 Thread Chris Wagner
Why can't u use Net::DNS? It's pure Perl so there shouldn't be any trouble using it anywhere on Windows. It doesn't have to be installed globally to use it. U can copy it into ur own directory and do a use lib in ur script to load it. Even in the worst case scenario u can copy all of the Net::D

Re: need help from a new hand for perl

2009-08-25 Thread Chris Wagner
At 03:43 PM 8/19/2009 -0500, Fei Shi wrote: >Only when I run the code below I have a little problem: >*cat ids_overlap_* | sort -u > "a file name"* > >I have 3 files named as *ids_overlap_*(21Us/coding/ram)*. The error message >is: >*The system cannot find the file specified. >cat.exe: write error

Re: need help from a new hand for perl

2009-08-18 Thread Chris Wagner
At 04:39 PM 8/18/2009 -0500, Fei Shi wrote: > But there is an error coming out when I tried to run this command >their demo: "perl auto_blast.pl 454_aligned.fa precursors. fa-b > >signatures". > >The error message is as follows: >*Copying subject file 'cp' is not recognized as an internal o

RE: Perl and memory...

2009-07-29 Thread Chris Wagner
At 12:30 PM 7/28/2009 -0700, Jan Dubois wrote: >It is also not clear to me if you were looking at physical or >virtual memory allocation. In some ways it doesn't make sense >to obsess about returning memory to the OS too much: if you don't >use it anymore, it will just get paged out to disk. And

Re: Perl and memory...

2009-07-28 Thread Chris Wagner
At 06:48 PM 7/28/2009 +0300, Serguei Trouchelle wrote: >I'm not sure. Ending thread on Windows deallocates memory as it said in MSDN, but I'm not exactly sure how Perl handles >all this stuff. So that could be Windows specific? The application I made was on Solaris. I actually thought it was a m

Re: Perl and memory...

2009-07-28 Thread Chris Wagner
At 01:31 AM 7/25/2009 +0300, Serguei Trouchelle wrote: >Or, as your question partially suggests, use threads: ending a thread will release the memory back to OS. Really? Is that documented anywhere? Knowing that could've saved me a lot of trouble on a massively threaded long running application

Re: Substitution problem

2009-07-23 Thread Chris Wagner
Hi. I'm not totally sure what ur asking but it seems that u want to do variable substitution in an XML file. If the variable names are already in the text u need an eval. $text = eval "\"$xmlfile\""; That will replace $1 with whatever it's current value is. However, this isn't really the right

Re: Differentiating MS office files from other Files?

2009-07-23 Thread Chris Wagner
Hi. U should check out the `file` utility provided by Cygwin. D:\GE>file -pk TNAdoc_draft1.doc TNAdoc_draft1.doc: Microsoft Office Document At 12:39 AM 7/16/2009 -0700, imagine2200 wrote: >Hej everyone, > >   I want to know if their is any way in perl >to differentiate Microsoft Office file

Re: CPAN install directory usage

2009-07-01 Thread Chris Wagner
There should not be stars in front of any of the Perl statements. Although I don't think that is the main problem here. If it can find Tk.pm it should be able to find Events.pm. U'll need to go into the Tk directory and manually verify the presence and permissions of all the files Tk needs. Inst

Re: Archive::Zip problem

2009-07-01 Thread Chris Wagner
read( $fileName ) Read zipfile headers from a zip file, appending new members. Returns AZ_OK or error code. my $zipFile = Archive::Zip->new(); my $status = $zipFile->read( '/some/FileName.zip' ); At 10:06 AM 7/2/2009 +0530, Kprasad wrote: >Hi All >I've simple perl pro

Re: CPAN install directory usage

2009-07-01 Thread Chris Wagner
Hi. The first thing u need to do is manually check what directory Tk.pm is in. Do a search if necessary. So if Tk.pm is located in V:\x\y\z\Tk.pm, put `use lib "V:/x/y/z";` at the top of ur script. That should be all u need. If that doesn't work then there could be permissions issues. Let us

Re: use case for activeState

2009-06-22 Thread Chris Wagner
Not to be melodramatic, but u can create the entire Internet using ActiveState Perl. U could build Yahoo, Google, and Amazon for starters. It's really suitable for every conceivable task other than audio video. At 01:47 PM 6/18/2009 -0400, Pipirilo wrote: >Is there a webpage in which I can see w

Re: Need help with my code

2009-06-22 Thread Chris Wagner
Hi. I can understand why nobody on the other list responded to u. I'm taking an educated guess at what ur question is. "It doesn't work" isn't a good question. Sorry to bust ur chops but asking well constructed questions is the best way to get help. Why are u using Tie::File? With small files

Re: question about recursion

2009-05-22 Thread Chris Wagner
Hey. Yeah deep recursion is something I don't really want to deal with. :) I've only used recursion once and that was to walk a data structure. For this kind of problem, which is a convergence problem, I would use a loop. I'm assuming that there is a variance value that is computed and compared t

Re: use system() function

2009-05-13 Thread Chris Wagner
Hi. Maybe if u gave a more high level description of what ur trying to do we might be able to help u more. I think what ur going for is a find/replace on a list of files? If so, this is not the way to do it. A generic find/replace would be like: foreach $file (@files) { open FILE, "<",

Re: IO::Socket question (client receive - when # of bytes to be receivedis NOT known in advance)

2009-04-24 Thread Chris Wagner
If ur just trying to pull data from websites I would highly recommend LWP or WWW-Mechanize. No need to reinvent any wheels. If this is just a demonstration and ur trying to do something else, what u need here is nonblocking read. As u accumulate more of the response u can inspect it to see when

Re: running a dos program from perl

2009-04-03 Thread Chris Wagner
I would use Expect for this kind of thing. At 08:44 PM 3/31/2009 -0400, Spencer Chase wrote: >Greetings Perl-win32-users, > >I need to run a dos program with parameters about 1500 times with different parameter sets. I have a perl script that creates batch files with the program call and parameter

RE: what is the most robust and accurate way to determine the BOOTvolume?

2009-03-31 Thread Chris Wagner
Hi. The "right way" to retrieve this kind of information is from WMI. If u never used it download Scriptomatic from Microsoft and start exploring. I don't think it flat out tells u the information ur looking for but I think u can figure it out by cross referencing some things. The branches u'll

RE: trouble understanding unicode

2009-03-27 Thread Chris Wagner
Sorry for being contrarian here, but this is wrong. Unconditionally blowing away control characters is not the right way to do anything. Using Perl's own encoding disciplines is the right way to do this. While this tr// may work in this case and on other simple files, u just don't know what legi

Re: New to Perl and stuck

2009-03-03 Thread Chris Wagner
Hi. Try this with the directory name as the command line argument. Let me know if u have any questions. I really recommend getting one of the O'Reilly books to really get into Perl. %estparms = map {$_, 1} (18,21..24,28..31,206..208); %popparms = map {$_, 1} (220,223..226,229..233,424..426); $

Re: Commaring Two dates or month

2009-02-25 Thread Chris Wagner
Hi. use Time::Local; %months = qw/Jan 1 Feb 2 Mar 3/; # etc. ($day, $mon, $yr) = split/-/, "5-Feb-09"; ##$time = timelocal($sec,$min,$hour,$mday,$mon,$year); see perldoc Time::Local $time = timelocal(0,0,0,$day,$months{$mon} - 1, $yr + 100); $now = time(); $diff = $now - $time; print "now $now, ti

Re: long lasting command execution from cgi

2008-12-09 Thread Chris Wagner
to display, however that file gets created completely after say 4-5 minutes. > > Regards & Thanks Prabir Senapati mailto: [EMAIL PROTECTED] > > >--- On Sat, 12/6/08, Chris Wagner <[EMAIL PROTECTED]> wrote: > >> From: Chris Wagner <[EMAIL PROTECTED]> >>

Re: NET::SSH2 - No Output

2008-12-05 Thread Chris Wagner
At 04:10 PM 12/5/2008 -0500, listmail wrote: >> I have to chime in. That kind of construct is just plain wrong. :) U need >> an if{} block to test for every possible return type of $chan->read(). i.e. >> blank, undef, valid number, invalid number, and other junk. U've fallen >Uh, I think you ar

Re: NET::SSH2 - No Output

2008-12-05 Thread Chris Wagner
At 02:04 PM 12/4/2008 -0600, SelfSimilar wrote: >> try something like >> >> print $buf while (($len = $chan->read($buf,512))||0) > 0); > >Thank you for the suggestion. Unfortunately, it get the same error warning > >Use of uninitialized value in numeric gt (>) at SFTP_test2.pl line 21 I have to c

Re: long lasting command execution from cgi

2008-12-05 Thread Chris Wagner
It sounds like u just want to display the the output file in the web browser. A simple redirect will do that. Are u looking for something more than that? At 10:58 PM 12/4/2008 -0800, [EMAIL PROTECTED] wrote: >I wonder whether I can query on Unix Perl here. However I would appreciate if someone

Re: AdminMisc and hard drive recognition

2008-12-03 Thread Chris Wagner
Hi. I'ld recommend using WMI for these kinds of things. It's more robust and u'll have far more cabability than with any of the Win32* modules. Download Scriptomatic from Microsoft to learn how to use it. At 09:52 AM 12/2/2008 -0600, [EMAIL PROTECTED] wrote: >Hi, list. > >My PC has two physical

Re: RegExp matching over multiple lines

2008-10-21 Thread Chris Wagner
Hi. Ur problem probably has to do with how ur eating the HTML file. A regex with /s needs the entire file in one variable. If u do a line by line with it won't work since u won't have everything in one var. Give this a try. $file = join "", ; @divmatches = $file =~ m/]*>(.+?)<\/div>/sg; As o

Re: problem with FIRSTKEY in tied hash implementation

2008-10-01 Thread Chris Wagner
Hi. I've had similar problems in other areas with the kind of problem ur describing. The problem is ur using "in-band signaling", as we say in the telecom world. Remember when kids could whistle into a phone and make free long distance calls? That was because of in-band signaling, the control i

Re: Beginner Problems working with spaced filenames and directories on win

2008-09-23 Thread Chris Wagner
I would put some print statements in there to verify that the variables contain what u think they contain. Also Data::Dump::pp is ur friend. e.g. print "\$top: $top\n"; Another thing I noticed. Normally u want "opendir DIR, $top", not $DIR. If $DIR is undef, that code will fail. A best practi

Re: WSDL

2008-09-12 Thread Chris Wagner
At 05:19 PM 9/12/2008 -0700, Glenn Linderman wrote: >You have "#expression". Maybe you need >"/trees/config/trends/~trend/display_colors/background.value"? OR maybe >you need "$expression"? Or maybe this is just a typo in the email? Heh, no, that is just placeholder text. ;) The /trees... th

WSDL

2008-09-12 Thread Chris Wagner
Greetings and felicitations. I've been trying to use SOAP::WSDL to grab some data but I'm having trouble figuring out how to do it in Perl. We have an HVAC system that provides a WSDL interface that I need to poll values from. The vendor gave us some example VB code that should poll the thing bu

Re: Run perl on window using cygwin+Eclipse+EPIC

2008-09-10 Thread Chris Wagner
I think what ur asking is why does this work under Cygwin but not under Eclipse? Or vice versa? It all depends on what "shell like thing" the `` command is being filtered through. Cygwin paths and Windows paths are not interchangable. If u run it under Cygwin the paths will be like /c/perl/perl

Re: Referenced data changing

2008-09-10 Thread Chris Wagner
Ohayou. I think what ur asking is why does @code change when u loop over it with foreach, ne? This is because foreach only takes a reference to the list values, it doesn't create a copy. So changing the iterand changes the original value. If u don't want this u have to make ur own copy of the v

Encryption recommendations

2008-08-08 Thread Chris O
Hi All! I need to encrypt txt files on a shared linux web server, then decrypt & read them on a win32 box. What module(s) are recommended for this? - Chris ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe:

Track mouse position

2008-06-06 Thread Chris O
when they're away from their desk. I already know how to compile a perl script, distribute it to all workstations, and have it report back to a server. I need to know what's the best way to implement tracking of mouse movement. Ideas? Also, the workstation OS is XP Pro if it makes any diffe

Re: mail message truncated when using net::smtp

2008-05-17 Thread Chris Lindsley
putting some \n's in. The message sent successfully. No truncation. It seems that the smtp server I'm using must have a line length limit. Maybe all smtp servers have that limit. Just thought I'd post this in case others had this issue. Thanks, Chris On Fri, May 16, 2008 at

mail message truncated when using net::smtp

2008-05-16 Thread Chris Lindsley
e Perl Home Page. Thanks! Chris ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

RE: draw boxes around tablular data ???

2008-05-16 Thread Chris O
as HOW to draw boxes around this tabular data. -- You could use an image file format or PDF to display the text. Then, draw boxes around it. - Chris ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com

Re: module to access a remote machine

2008-04-10 Thread Chris Wagner
At 12:39 PM 4/10/2008 -0700, raj esh wrote: >Hi all, > > This is raj. I want your help in the solving this problem. What module can be used to get a file (this is not a system file this is my own created file) from a remote win 2003 server machine when FTP,Telnet,SSH service on that box is disa

RE: Perl tree data & HTML

2008-04-10 Thread Chris Wagner
At 12:58 PM 4/9/2008 +0100, Brian Raven wrote: >use CGI::Pretty qw{:standard}; I'ld be cautious about using CGI::Pretty. I've had it randomly mangle output. It would chop the final character of whatever was passed to it at random times and then quit doing it later. I couldn't figure out what w

PerlEX,Modules, Sharing variables

2008-02-27 Thread Chris O
I'm attempting my first PerlEX app and I'm failing miserably. :-( The goal is for my module to access variables stored in the calling script. The following example works when run as CGI but fails as PerlEX. Am I on the right path here or is there a better way? #

RE: MSVCR71.dll error in ActivePerl-5.10.0.1002-MSWin32-x86-283697.msi

2008-02-26 Thread Chris O
rks when I revert to 5.8. - Chris ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

MSVCR71.dll error in ActivePerl-5.10.0.1002-MSWin32-x86-283697.msi

2008-02-25 Thread Chris O
found". This is on server 2003 sp1. I found some info at http://support.microsoft.com/kb/895994 related to this error. - Chris ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.c

Re: My first 2 Scripting Games commentaries are online now

2008-02-20 Thread Chris Wagner
Ooo there's a picture up there? I'm not going to go there now because I think it's better for his appearence to remain a mystery. :P At 09:37 AM 2/21/2008 +0800, Foo JH wrote: >Hey Jan, now I know how you look...no guru-beard? I'm disappointed. > >Jan Dubois wrote: >> Feel free to check them out,

Re: Adding matched files to zip archive

2008-01-29 Thread Chris Wagner
At 11:39 AM 1/29/2008 -0500, Tseng, Joe [CONTRACTOR] wrote: >$objZip->addTreeMatching( $workingdir, 'config', "\.(ini|txt)"); > >But the following line doesn't work for adding what is remaining to >another archive directory : > >$objZip->addTreeMatching( $workingdir, 'results', "!\.(ini|txt)");

Re: vague error message

2008-01-08 Thread Chris Rodriguez
John Mason Jr <[EMAIL PROTECTED]> wrote: Chris Rodriguez wrote: > Hi everybody, > I've been getting an error message I don't know what to do about: > Perl has caused an error in PERL58.DLL. Perl will now close. > If you continue to experience problems, try resta

vague error message

2008-01-04 Thread Chris Rodriguez
of other scripts over and over. I goes through once just fine, but on the second time through, when it gets to a particular script... thud. And there's nothing wrong with that particular "sub" script. It runs just fine by itself (and on the first time through). Does anyone

Re: Strange behavior with print

2008-01-03 Thread Chris Wagner
At 10:17 AM 1/3/2008 -0800, Mike Gillis wrote: >You might want to take a look at PerlIO::eol, an IO layer which does >basically what you're asking for. > > From the docs: > >"This layer normalizes any of CR, LF, CRLF and Native into the >designated line ending. It works for both input and output

RE: Strange behavior with print

2007-12-29 Thread Chris Wagner
At 05:27 PM 12/28/2007 -0800, Jan Dubois wrote: >I'm not sure what you are trying to say here. While reading a file >in text mode on Windows, it does not really matter if the lines are >terminated by CRLF or LF alone; the CR will be stripped and at the >Perl level you always have just a LF, just l

RE: Strange behavior with print

2007-12-28 Thread Chris Wagner
I see what ur saying and actually agree with u. But PerlIO automatically (this is one automatic thing I don't like) translates between CRLF and LF on Windows systems. As Jan said setting binmode() will solve ur problem. I personally feel that binmode should be the default everywhere and it sho

Re: Happy 20th Birthday, Perl!

2007-12-18 Thread Chris Wagner
Omedetou gozaimas Perl-san!! ^^ -- REMEMBER THE WORLD TRADE CENTER ---=< WTC 911 >=-- "...ne cede malis" 0100 ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/m

XMPP/Jabber example

2007-12-04 Thread Chris O
ion. http://www.coversant.com/Products/SoapBoxServer/Overview/tabid/99/Default.aspx Thanks! - Chris ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: Cygwin perl and fork();

2007-09-04 Thread Chris Wagner
At 03:22 PM 9/4/2007 +0100, George wrote: >I've made the sure the data is actually coming back by putting a print >in the while loop and that shows that it's coming back from the child. >All the data makes it back, but the while loop doesn't finish and the >timeout alarm hits, so the child gets

Re: Back-up drives to CD and other drives

2007-08-23 Thread Chris Wagner
Hi. What I do is use several small bash scripts that use rsync. Each mini script (one-liner) backs up a certain directory tree or a whole disk. They can be scheduled or run manually. So usually after I do my email I run that rsync script to backup my email client. D:\backups>cat eudorabackup.s

Re: File::Remove cann't remove 'Japan'

2007-08-15 Thread Chris Wagner
Once again greetings Ta-kun. I haven't had much success dealing with wide characters from Perl. There are two interfaces Windows provides for accessing file names, ANSI and Unicode. Code I've tried in the past would only use the ANSI interface so u can't deal with anything with a codepoint above

RE: control M's

2007-06-26 Thread Chris Rodriguez
Thanks everyone for the overwhelming response! I tried Jack's solution first because it was so easy. It turns out there's a simple button on my ftp window to choose between binary or ASCII (or Auto). Voila! Works like a charm! This has been immensely helpful! Chris P.S. T

Re: download window instead of executing

2007-06-25 Thread Chris Wagner
At 10:36 AM 6/25/2007 -0700, Dan Jablonsky wrote: >just a quick questions: why do I get a download window >when I'm trying to execute a .pl file in the browser? >It's something very simple but I forgot how one fixes >this. Hi. What do u mean by execute in the browser? That doesn't make sense. Ar

Re: control M's

2007-06-25 Thread Chris Wagner
e doesn't exist on Windows. U can tell if they're there or not by viewing the file with vi/vim on the unix box. It will print them as ^M if present. At 01:40 PM 6/25/2007 -0700, Chris Rodriguez wrote: >Hi everyone, > I wrote a cgi script in PERL which won't execute. I&#x

control M's

2007-06-25 Thread Chris Rodriguez
tter. Can anyone advise me on dealing with this? How can I remove them? How can I tell if they're there or not? How can I type up a script so that they never appear in the first place, etc.? Thank you, Chris - Boardwalk for $500? I

Re: Perl-Win32-Users Digest, Vol 11, Issue 10

2007-06-19 Thread Chris Wagner
At 08:53 AM 6/20/2007 +0530, jagdish eashwar wrote: >I got an idea after your suggestion that I should explore the Text::Wrap >module. If I can get perl to split the string after every so many >characters, I'll have achieved what I want. Is that possible? That's exactly what Text::Wrap does. If

Re: Truncating decimal number

2007-06-19 Thread Chris Wagner
At 03:50 PM 6/19/2007 -0700, John Townsend wrote: >I don't need to round the number, I just want it to drop everything >after the 6th decimal point. This should be easy, but I'm drawing a >blank. If u really need to truncate it and can't use sprintf for some reason u can do this. sub trunc {

RE: control characters in perl

2007-06-19 Thread Chris Wagner
At 09:40 AM 6/19/2007 -0700, Michael Higgins wrote: >> Do word processors insert any character for word wraps like >> they do for new lines(\n)? If yes, what is the corresponding >> perl control character? I need to split a multi line string >> from a word table cell at the word wraps. Not tha

Re: Net::SNMP and threads

2007-06-17 Thread Chris Wagner
At 06:26 PM 6/17/2007 -0700, Bill Luebkert wrote: >I thought you could only start 64 threads on doze ? What happens with just >50 threads instead of 100 ? I've had over 70 running on XP. The script is actually running on Solaris. That's why I said I was "just asking". :P -- REMEMBER THE WORL

Net::SNMP and threads

2007-06-17 Thread Chris Wagner
Greetz all, my email was toasted but now I finally got it fixed. I wanted to ask here if anybody had any experience using Net::SNMP with threads. I'm working on a script that uses it to poll device data with 100 concurrent threads. The memory usage however goes up forever, until it crashes. I w

Re: Redirecting STDOUT

2007-04-01 Thread Chris Rodriguez
Bill Luebkert <[EMAIL PROTECTED]> wrote: Chris Rodriguez wrote: > Hi everyone, > I saw the following on another PERL list-serve: > > "If you are on windows, then see perlfaq8 if ActiveState perl for > how to redirect STDOUT and STDERR when doing backticks." >

Redirecting STDOUT

2007-03-30 Thread Chris Rodriguez
nt. Did I miss something? How do I do this? I frequently get drastic errors (my computer shuts down!) when I try to use backticks. Thanks, Chris - Get your own web address. Have a HUGE year through Yahoo! Small Business._

Re: Compiling Perl

2007-03-21 Thread Chris Wagner
At 05:34 PM 3/20/2007 -0400, Nelson R. Pardee wrote: >In order to avoid installing Perl on a bunch of PC's, I'd like to compiler >a couple of Perl programs. Any recommendations? I didn't see anything >recently in the archives but I might have missed it. Thanks in advance. I don't think the "actual

Re: how to round a floating-point value to an integer value

2007-03-19 Thread Chris Wagner
At 08:39 AM 3/19/2007 -0500, [EMAIL PROTECTED] wrote: >I have a recollection from a computer math class many years ago that you >should never, ever, round intermediate numbers in a calculation. The >"rounding" itself then becomes part of the next step, then the next, and >so on. While that may n

Re: how to round a floating-point value to an integer value

2007-03-19 Thread Chris Wagner
At 04:34 AM 3/18/2007 +, [EMAIL PROTECTED] wrote: >Do 'human rounding principles' say that you would expect 10 / 3 rounded >to 2 DP would produce 3.34 or 3.33? How about -10 / 3? 10/3 rounded to two places is 3.33. 3.34 is simply wrong. To say that 3.34 is 10/3 rouned to two places means tha

Re: subs, eval, and BEGIN

2007-03-19 Thread Chris Wagner
It actually does work in the BEGIN block too. I feel ur pain. Eval's can be a total [EMAIL PROTECTED] At 01:13 AM 3/19/2007 -0700, Glenn Linderman wrote: >Why not? tr said it compiled the strings at compile time, compile time >sounded like a begin block, but of course eval is also compile time

Re: subs, eval, and BEGIN

2007-03-18 Thread Chris Wagner
How come u were trying to put it in a begin block? At 06:28 PM 3/18/2007 -0700, Glenn Linderman wrote: >So I'm trying to make a sub to tr iso-8859-1 to unaccented ASCII >equivalents. Maybe one already exists, somewhere, but now that I've >gotten this far, I'm confused: > >#!perl >BEGIN { --

Re: What to do when perl.exe bombs???

2007-03-18 Thread Chris Wagner
Sorry, I've got no clue. I would file bug reports with Activestate and the module authors and see what shakes out. -- REMEMBER THE WORLD TRADE CENTER ---=< WTC 911 >=-- "...ne cede malis" 0100 ___ Perl-Win32-Users mailing list Perl-Win3

RE: how to round a floating-point value to an integer value

2007-03-17 Thread Chris Wagner
I decided to write my own rounding algorithm that takes it out of Perl's hands and does all the math itself using strings. Since it uses strings it operates on the same literal value that a human would be looking at rather than an opaque object. Floats are better thought of as opaque objects than

Re: how to round a floating-point value to an integer value

2007-03-17 Thread Chris Wagner
At 05:32 PM 3/17/2007 +, Mark Dootson wrote: >If you are using floating point arithmetic, you want unbiased rounding, >'even' if you don't realise that this is good for you. That's all good for rounding intermediate numbers in a calculation but the OP was trying to round for display. In this

RE: how to round a floating-point value to an integer value

2007-03-16 Thread Chris Wagner
At 12:48 AM 3/17/2007 -0500, [EMAIL PROTECTED] wrote: >Incidentally, perl is a typeless language, compounding the problem even more. That is, perl >converts a variable or literal to an integer, a floating point double, or text string on-the-fly as >needed. A single line of perl code may hide seve

RE: how to round a floating-point value to an integer value

2007-03-16 Thread Chris Wagner
At 08:04 PM 3/16/2007 -0400, Su, Yu \(Eugene\) wrote: >I expect >print sprintf("%.0f %.0f %.0f %.0f %.0f %.0f %.0f %.0f %.0f %.0f", 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5); >will give me >1 2 3 4 5 6 7 8 9 10 >but instead I get >0 2 2 4 4 6 6 8 8 10 >How to round a floating-point value

RE: localtime failing on DST change

2007-03-13 Thread Chris O
ine for me on windows... but I'm having the same issue on Fedora. :-( - Chris ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Re: Perl Load Times

2007-03-12 Thread Chris Wagner
At 06:34 PM 3/12/2007 -0400, Nelson R. Pardee wrote: >If I haven't run any Perl programs in awhile, it takes a bit to start up. >Subsequent executions startup pretty quickly. Is this possibly a caching >of Perl itself by Windows? other? 2 Ghz processor, 1 G ram. Ur exactly right. Once u run Perl

Re: How to generate file signatures?

2007-03-12 Thread Chris Wagner
Another caveat that I might as well throw out there is that checksums become less reliable the larger the file size. There are an infinite number of files that correspond to each checksum value. That applies to MD5, SHA, Tigers, everything. And for each size of file there is a large, though not

Re: STDIN not available/@ARGV empty

2007-03-09 Thread Chris Wagner
It doesn't work for me either. On my system it opens printargs.pl in notepad. Editing is the default action under Explorer. The shell shouldn't care about Explorer's settings. Now if I change the default action to Run, it works as expected. Better to use bash for these sorts of things. :) D:\ba

Re: How to generate file signatures?

2007-03-09 Thread Chris Wagner
>Dennis Daupert wrote: >> Hello list, >> >> Now that management has moved us off Unix and onto windows >> >> We develop software packages, and use a perl script to generate >> checksum signatures to validate our packages. >> >> On Solaris, we use cksum; on linux, md5sum. >> >> What do peopl

Fill PDF Form Fields

2007-03-06 Thread Chris O
Anyone know how to fill in form fields on a PDF? I've looked at a few modules on cpan & googled a bit, but can't seem to find anything . Thanks, Chris ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To uns

Re: checking for infinite loops

2007-03-05 Thread Chris Wagner
At 04:01 PM 3/4/2007 -0800, Bill Luebkert wrote: >What's the exact message ? I added $^E in code below which may help. Using this format to get the most recent Windows error message is good for clarity's sake. $^E is context sensitive while this form is unambiguous. Win32::FormatMessage(Win32::

Re: checking for infinite loops

2007-03-04 Thread Chris Rodriguez
pts like this, but when I have to do a whole bunch it adds up and it's kind of a drag. And once this happens, everything on my computer turns sluggish. Try to say, close a window by clicking the x in the upper right-hand corner - the window closes all right - like 5 seconds later.

Re: More efficient regex

2007-02-28 Thread Chris Wagner
return $text; } That should do it and be about as efficient as possible. :) If u have to deal with sentences then u'll need a few more lines to deal with periods and commas. These O'Reilly gems are useful too. Finding all-caps words @capwords = m/(\b[^\Wa-z0-9_]+\b)/g; Finding a

  1   2   3   4   5   6   7   8   >