Re: Iffor

2006-04-19 Thread Chris Wagner
At 10:42 AM 4/20/2006 +1000, Sisyphus wrote: >On the subject of replacing brackets with modifiers (which I think was also >raised earlier on), I was surprised to find that using a modifier is about >25% faster than brackets: >'modifier' => 'for(@x) {$z1++ if $_ != 3}', >'brackets' => 'for(@y) {if($

Re: waking up a sleeping thread

2006-04-19 Thread Chris Wagner
At 05:42 PM 4/19/2006 +0200, Daniel McBrearty wrote: >If I have a thread that is sleeping indefinitely, how can I wake it from >some other thread? First of all u should be use'ing threads, not Thread. Thread is obsolete. To get another thread to wake up u first have to put it to sleep somehow. Th

Re: Iffor

2006-04-19 Thread Sisyphus
- Original Message - From: "Glenn Linderman" . . > > Get a load of this variation: > > perl > use warnings; > no warnings "once"; > use Benchmark; > > @x = (1 .. 100); > @y = (1 .. 100); > @z = (1 .. 100); > @w = (1 .. 100); > > $z1 = 0; > $z2 = 0; > $z3 = 0; > $z4 = 0; >

RE: Opening an Excel workbook with links to other data sources

2006-04-19 Thread Suresh Govindachar
> Lynn. Rickards Sent: Wednesday, April 19, 2006 6:02 PM > >Suresh Govindachar wrote: >> Hello, >> >> Issue: opening an excel file brings up a dialog box >> stating that the "workbook contains links to >> other data sources" and asks if the data >>

Re: Opening an Excel workbook with links to other data sources

2006-04-19 Thread Lynn. Rickards
Suresh Govindachar wrote: Hello, Issue: opening an excel file brings up a dialog box stating that the "workbook contains links to other data sources" and asks if the data should be updated. Just-in's suggestion of adding "$Excel->{DisplayAlerts} = 0;" to

Re: Iffor

2006-04-19 Thread Sisyphus
- Original Message - From: "Glenn Linderman" . . > > I think that the > > for( grep ($_ != 3, @a)) > > is quite clear in bundling the element selection together, and > separating it from the functions being performed. > I would much rather see (as suggested earlier on in this thread): f

RE: Opening an Excel workbook with links to other data sources

2006-04-19 Thread Suresh Govindachar
For this issue, Excel's Help actually has to-the-point and relevant information: ---8<--- * Don't prompt for all workbooks I open, and update the links automatically This option is for the current user only, and affects every workbook opened. Other users of the workbook a

RE: Opening an Excel workbook with links to other data sources

2006-04-19 Thread Timothy Johnson
Check Tools-->Options-->Calculation Tab and try changing the Calculation radio button to Manual. That might get rid of the message. You just have to keep in mind that you need to manually recalculate your values if you want to see the current data. -Original Message- From: [EMAIL PROT

Re: waking up a sleeping thread

2006-04-19 Thread Daniel McBrearty
sorry for double post ... thought I had only replied to Peter the first time. On 4/20/06, Daniel McBrearty <[EMAIL PROTECTED]> wrote: hmmm ... tried that, duzzen work ... (scratches head ;). the perldoc for sleep talks about sending a SIGALRM signal, but my poking around revealed no such sig under

RE: Opening an Excel workbook with links to other data sources

2006-04-19 Thread Allegakoen, Justin Devanandan
---8<--- Just-in's other suggestion was "If not you may have to fudge something with Win32::GuiTest", but didn't elaborate on the "something" ... ---8<--- Going down the GuiTest path is forcing things in a less than elegant way. Why not have a dig around in the Object br

waking up a sleeping thread

2006-04-19 Thread Daniel McBrearty
hmmm ... tried that, duzzen work ... (scratches head ;). the perldoc for sleep talks about sending a SIGALRM signal, but my poking around revealed no such sig under win XP. I don't know what signal I could send, nor how to send it. I want to wake it, not kill it ...-- Daniel McBreartyemail : danie

Re: running a perl app

2006-04-19 Thread Sisyphus
- Original Message - From: "Chris Wagner" . . > > Actually the Cygwin commands are independent exe's and don't have to be run > from any certain shell. I run cygwin commands from cmd.exe all the time. > The key difference is that they act and return output in the context of the > cygwin

RE: Iffor

2006-04-19 Thread Ng, Bill
@folders will have, at most 7 objects in it. All strings of less than 80 bytes. Bill Ng -Original Message- From: Arms, Mike [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 19, 2006 5:24 PM To: perl-win32-users@listserv.ActiveState.com Cc: Ng, Bill Subject: RE: Iffor Bill, as long as

RE: Screen Scraping a DOS window

2006-04-19 Thread Timothy Johnson
If you're referring to the same console that you ran your script from then you can get it all just by redirecting STDOUT and STDERR. It will go back after your script finishes running. open(STDERR,">>","error.log") or die("Couldn't open 'error.log' for append!\n"); -Original Message- F

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: >

Screen Scraping a DOS window

2006-04-19 Thread Howard Maher
Does anyone know of a good way to screen-scrape a DOS window from Perl? We have error messages that get reported in various and sundry ways, but thought it might be a nice addition to scrape the last 5-25 lines from the DOS box just as a good measure. Thanks in advance for any suggestions... Howa

RE: waking up a sleeping thread

2006-04-19 Thread Peter Eisengrein
## do something here to wake the thread up ... but what?  You can try:       $thr->freshCoffee();   and if that doesn't work, you can try:       $thr->inviteMyKidsOverOnASaturdayMorning();   The latter always seems to work for me. :)   ___ Perl-Win32

RE: Iffor

2006-04-19 Thread Ng, Bill
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: --- for

waking up a sleeping thread

2006-04-19 Thread Daniel McBrearty
HiIf I have a thread that is sleeping indefinitely, how can I wake it from some other thread?use strict;use warnings;use Thread qw(async);my $thr = async {    print "thread is sleeping\n";     sleep;    print "thread is back\n";};sleep(1);## do something here to wake the thread up ... but what?$thr

Re: Opening an Excel workbook with links to other data sources

2006-04-19 Thread Suresh Govindachar
Hello, Issue: opening an excel file brings up a dialog box stating that the "workbook contains links to other data sources" and asks if the data should be updated. Just-in's suggestion of adding "$Excel->{DisplayAlerts} = 0;" to modify the code to be:

Re: running a perl app

2006-04-19 Thread Chris Wagner
At 04:32 PM 4/19/2006 +1000, Sisyphus wrote: >On windows the same command could successfully be run in the msys shell, or >in Cygwin's bash shell - and perhaps some other shells, too - but not the >cmd.exe shell, unless you've installed a which.exe such as that available >from http://gnuwin32.sourc

Error: No valid repositories: Error: 500 Can't connect

2006-04-19 Thread Benct Philip Jonsson
Dear friends, when I try to use ppm I get the following error message Error: No valid repositories: Error: 500 Can't connect to ppm.ActiveState.com:80 (Bad protocol 'tcp') Error: 500 Can't connect to ppm.ActiveState.com:80 (Bad protocol 'tcp') I'm running Windows XP with no proxy, but I guess

Re: exhausting file handles in Win32

2006-04-19 Thread Carlos Barbet
Indeed! This seems to get the job done and it provides an excellent spring board for diving into the Win32API module. Thanks Billy! lol. Now, I'll be reading perldocs and the like instead of testing software ;) Kindest regards, Carlos Billy Conn wrote: I'd try the following: #!/usr/bin/p

RE: running a perl app

2006-04-19 Thread Peter Eisengrein
Title: RE: running a perl app > > >To determine the correct path for your perl interpretor, use: > > > > >    which perl > > > > >-- > > > > Please give me a context. > > > > Note that the original post pertained to a Unix-like system > (not Windows) - > and the answer you've quoted abo

Please remove me from maling list

2006-04-19 Thread reza javadi
Please remove me from maling list Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min.___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/

RE: Opening an Excel workbook with links to other data sources

2006-04-19 Thread Allegakoen, Justin Devanandan
---8< When I manually open an Excel file, it bring up a dialog box stating that the "workbook contains links to other data sources" and asking if the data should be updated. ---8< Try and see if you can supress the pop up with this:- $Excel->{DisplayAlerts} =