On Thu, 4 Sep 2003, Ecker Sandor wrote:
> Hi!
>
> I write a program for a win98 machine, and I use (thenks for this list) the
> Win32::Serialport module. But I would like to test this program under Linux, so
> I would like to write something like this:
>
> package Utils;
> #ifdef __WIN32
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".;
Gerard ter Haar <[EMAIL PROTECTED]> wrote:
> $errs->{ err_main_notfound } = "file not found. check config.";
> $errs->{ err_main_perms } = "no permissions, check docs".;
> $errs->{ err_main_unknown } = "unknown error occured.";
>
> Now I would like to remove the _main part of the hash keys, so I
Gerard ter Haar wrote:
> Hi!
>
> 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".;
> $errs->
Thank you. I will review that module...
jwm
-Original Message-
From: Ryan Amschel [mailto:[EMAIL PROTECTED]
Sent: September 04, 2003 19:31
To: 'Moon, John'; [EMAIL PROTECTED]
Subject: RE: STDERR in Windows
John,
I have used Tie::STDERR to accomplish this.
-Ryan Amschel
ESRI
-Ori
Here's one way to do it:
my @keys = keys %$errs;
foreach my $key (@keys) {
if (my ($suffix) = $key =~ /^err_main_(.+)/) {
$errs->{"err_$suffix"} = delete $errs->{$key};
}
}
Peter Guzis
Web Administrator, Sr.
ENCAD, Inc.
- A Kodak Company
email: [EMAIL PROTECTED]
www.encad.com
-Orig
> Now I would like to remove the _main
> part of the hash keys, so I would get...
No, there is no way to change the name.
The only way is to delete the key and create another one like this:
$errs->{ err_notfound } = $errs->{ err_main_notfound };
delete $errs->{ err_main_notfound };
If you neede
John,
I have used Tie::STDERR to accomplish this.
-Ryan Amschel
ESRI
-Original Message-
From: Moon, John [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 04, 2003 3:45 PM
To: [EMAIL PROTECTED]
Subject: STDERR in Windows
I have a perl script I have converted (pl2bat) to a .bat file
Joseph Discenza <[EMAIL PROTECTED]> wrote:
> Simple operations on constants are probably performed at compile
> time (not an internals guru) even within an eval block. Someone
> else would have to explain to you why all parsing of the eval
> block is not delayed until runtime.
Presumably because
Hi!
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".;
$errs->{ err_main_unknown } = "unknown error occu
I have a perl script I have converted (pl2bat) to a .bat file which will run
from the scheduler on an NT platform. I would like to "capture" STDERR in a
"file" so that it can be reviewed after the job is ran. Is there a way to do
this in my perl script or the .bat file ?
jwm
__
> PPS: Summary of answers to other questions:
>
> FreezePanes (to make only a lower/to-right section scroll) works on a
> single cell, not a row or column. Do cellRange->Select;
> app->ActiveWindow0>{FreezePanes} = 1;
FreezePanes can work on a row or column, if you select that range.
use Win32
John Deighan wrote:
> Consider this simple program:
>
> use strict;
> use warnings;
> eval {
> my $x = 5;
> my $y = $x / 0; # simulate an error
> };
> if ($@) {
> eval { # ignore errors in this code
> print("An error occurred\n");
> }
>
my bad.
JD was right, ';' is a statement separator.
{ print "hi\n" }
is fine.
{ eval {..} print "hi\n" } is not- the eval{..} needs a semi colon
after it.
-r
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState
14 matches
Mail list logo