Re: Does Perl have "Case" Statements?

2002-03-01 Thread $Bill Luebkert
Jeffrey wrote: > --- $Bill Luebkert <[EMAIL PROTECTED]> wrote: > >>No they don't. In a switch, you can fall thru one >>case into the next if you >> >>like or you can break our of the switch. YOu can't >>do that with an if. :) >> > > The only time I've found this to be useful is when you > a

Re: predeclare freeze (was: querying once, using severaltimes)

2002-03-01 Thread Greg Wardawy
Never mind, I've found it. And it works great. Thanks a lot. Greg >>> "Greg Wardawy" <[EMAIL PROTECTED]> 03/01/02 01:27PM >>> >>> "Greg Wardawy" <[EMAIL PROTECTED]> 03/01/02 12:22PM >>> >>> <[EMAIL PROTECTED]> 03/01/02 12:05PM >>> Greg, Look into the Storable package. http://aspn.activestate.

Re: comparing two arrays, removing elements

2002-03-01 Thread Edward G. Orton
- Original Message - From: "James S. Martin" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, March 01, 2002 3:30 PM Subject: comparing two arrays, removing elements > Hi all, > > I'm having a logic gap in my code.. Can't quite figure out the best way > to do this. > > I have tw

Re: comparing two arrays, removing elements

2002-03-01 Thread Tim . Moose
James, Does the following code do what you want? The first step is ro cache the indices of the most recent files. This can be done with a hash table, keyed off of file name, that saves date and index. When a later date is found, replace the current hash record. The final step is to strip all b

RE: comparing two arrays, removing elements

2002-03-01 Thread John V. Pataki
Jim, Solving the 'array content sorting' issue... you could ignore using two arrays and just a hash table... --- snip --- foreach (@patchlist) { chomp; ($name, $date, $arch, $file) = split ','; $id = $name.",".$arch.",".$file; if (exists $patch{$id}) { if ($date gt $patch{$id}) {$patch

Re: Does Perl have "Case" Statements?

2002-03-01 Thread Jeffrey
--- $Bill Luebkert <[EMAIL PROTECTED]> wrote: > No they don't. In a switch, you can fall thru one > case into the next if you > > like or you can break our of the switch. YOu can't > do that with an if. :) The only time I've found this to be useful is when you are doing things like case-inse

Re: Does Perl have "Case" Statements?

2002-03-01 Thread $Bill Luebkert
Burak Gürsoy wrote: > Perl6 will have it ;) there are some articles about this in perl.com... but > I never needed switch-case... if/elsif/else do the same thing. No they don't. In a switch, you can fall thru one case into the next if you like or you can break our of the switch. YOu can't d

comparing two arrays, removing elements

2002-03-01 Thread James S. Martin
Hi all, I'm having a logic gap in my code.. Can't quite figure out the best way to do this. I have two arrays.. Each item in the array has some comma seperated values. The first value is the beginning name of the file, the second value is the standard 10 digit date stamp where the larger th

RE: Win32 script calling Unix server

2002-03-01 Thread Ian . Stewart
If all you're doing is running command-line apps on the UNIX box, Net::Telnet should do what you want. If you're looking at doing distributed computing (invoking methods on one machine and doing something with the return value on another machine), take a look at SOAP::Lite (www.soaplite.com) HT

Win32 script calling Unix server

2002-03-01 Thread Rafala, Michael
Suppose my Win32 machine has access to a Unix machine over our network. What would I need (modules?) to write a Win32 Perl script on my machine that would log on to and send commands to the Unix server? Perhaps, for instance, I want to fire some scripts for a language I don't have on my Win32 mac

predeclare freeze (was: querying once, using several times)

2002-03-01 Thread Greg Wardawy
>>> "Greg Wardawy" <[EMAIL PROTECTED]> 03/01/02 12:22PM >>> >>> <[EMAIL PROTECTED]> 03/01/02 12:05PM >>> Greg, Look into the Storable package. http://aspn.activestate.com/ASPN/CodeDoc/Storable/Storable.html Tim _ Tim Moose | T R I L O G Y voice (5

RE: capturing output from system() ...

2002-03-01 Thread Bellenger, Bruno (Paris)
>system "my_command 2>&1 NUL" First time I see this syntax. As far as I can say, it doesn't work. The correct form should be : my_command > NUL 2>&1 _ Bruno Bellenger Sr. Network/Systems Administrator -Original Message--

Archive::Zip bug?

2002-03-01 Thread Michal Jurosz
Hello. This code unzip files from $zip_path to $extr_path, but when you uncomment, tree lines below, then this code unzip files from $zip_path to './'. Where is a bug? Sorry, but my english is so bad. --- use warnings; use strict; use locale; use Archive::Zip::Tree;

Re: querying once, using several times

2002-03-01 Thread Greg Wardawy
>>> <[EMAIL PROTECTED]> 03/01/02 12:05PM >>> Greg, Look into the Storable package. http://aspn.activestate.com/ASPN/CodeDoc/Storable/Storable.html Tim _ Tim Moose | T R I L O G Y voice (512) 874-5342 fax (512) 874-8500 ___

Re: querying once, using several times

2002-03-01 Thread Tim . Moose
Greg, Look into the Storable package. http://aspn.activestate.com/ASPN/CodeDoc/Storable/Storable.html Tim _ Tim Moose | T R I L O G Y voice (512) 874-5342 fax (512) 874-8500 ___ Perl-Win32-Users mailing

querying once, using several times

2002-03-01 Thread Greg Wardawy
Hello all, I'm trying to figure out how to avoid running the same database query inside the scripts started via a system call from the parent script. It doesn't make much sense to run the same query, build the same hash tables and use their values in all scripts - I should run the query once

RE: capturing output from system() ...

2002-03-01 Thread Abner, Daniel
I'm not an expert on this subject, but I'll give my explanation why your example didn't work. "2>&1" in your example is getting the STDOUT and STDERR from "perl test1.pl". "_Perl_" did not return the expected output; test1.pl did. Your example is capturing the output of "Perl". It didn't have

Re: capturing output from system() ...

2002-03-01 Thread Scott Wessels
- Original Message - From: "Scott Wessels" <[EMAIL PROTECTED]> To: "Abner, Daniel" <[EMAIL PROTECTED]>; "perl win32 users" <[EMAIL PROTECTED]>; "Lawrence Lordanich (x11486)" <[EMAIL PROTECTED]> Cc: "porters" <[EMAIL PROTECTED]> Sent: Friday, March 01, 2002 10:14 AM Subject: Re: capturing