RE: Problem with Net::FTP

2003-03-19 Thread resaulpaugh

There is a windows console command that has both the word net and the word use

net use * unc_server\\share

A typo perhaps?

richard







Beckett Richard-qswi266 [EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
03/19/2003 03:33 AM


To:'Koteshwar Rao A' [EMAIL PROTECTED], [EMAIL PROTECTED]
cc:
Subject:RE: Problem with Net::FTP


Have you got a typing error in the line?:

use Net::FTP;

R.

 -Original Message-
 From: Koteshwar Rao A [mailto:[EMAIL PROTECTED]
 Sent: 19 March 2003 09:28
 To: [EMAIL PROTECTED]
 Subject: Problem with Net::FTP
 
 
 
   Hai ,
 
   My name is eswar , I am in a process of automating the 
 ftp process from
 a windows worstation to Unix server,
 
   When I am using this Net::Ftp for this , I am getting the 
 following
 error,
 
   Can't locate object method Use via package 
 Net::ftp(perhaps you
 forgot to load Net::ftp?)

   Is there any problem with the Perl package that is installed???
  
   Second question : How do I get the information about the 
 modules that
 are loaded in existing Perl ..
 
   Can anyone help me in getting out of this problem , Thanx 
 in advance
  
   -- Eswar
 

 
 ___
 Perl-Win32-Users mailing list
 [EMAIL PROTECTED]
 To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
 
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs




RE: Problem with Net::FTP

2003-03-19 Thread Koteshwar Rao A

Thank you  for the first question.

Is there any answer for second question,by using PPM.

--Eswar. 



-Original Message-
From: Beckett Richard-qswi266 [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 3:03 PM
To: 'Koteshwar Rao A'; [EMAIL PROTECTED]
Subject: RE: Problem with Net::FTP


Have you got a typing error in the line?:

use Net::FTP;

R.

 -Original Message-
 From: Koteshwar Rao A [mailto:[EMAIL PROTECTED]
 Sent: 19 March 2003 09:28
 To: [EMAIL PROTECTED]
 Subject: Problem with Net::FTP
 
 
 
 Hai ,
 
 My name is eswar , I am in a process of automating the 
 ftp process from
 a windows worstation to Unix server,
 
 When I am using this Net::Ftp for this , I am getting the 
  following
 error,
 
 Can't locate object method Use via package 
 Net::ftp(perhaps you
 forgot to load Net::ftp?)
   
  Is there any problem with the Perl package that is installed???

 Second question : How do I get the information about the 
 modules that
 are loaded in existing Perl ..
  
 Can anyone help me in getting out of this problem , Thanx 
 in advance
   
 -- Eswar
  
   
 
 ___
 Perl-Win32-Users mailing list
 [EMAIL PROTECTED]
 To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
 
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


(no subject)

2003-03-19 Thread Tim Straub
Hi list,

is there any way to open a hidden UNC path with the mkdir statement
given by a parameter.

Let's say I run the script with the parameter

\\server\new$

the path will get truncated one time by the newline '\n' and the dollar
sign will by cut off.

Then putting it in the variable $x the statement

mkdir( $x, 0777 );

will fail!

I would like to use the script as a subroutine which will get the path -
this have to be done as \\server\\share\new_directory. So it is not
possible to use an other syntax!

Any suggestions???

Thanks in advance

Tim


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


(no subject)

2003-03-19 Thread Tim Straub
Hi list,

is there any way to open a hidden UNC path with the mkdir statement
given by a parameter.

Let's say I run the script with the parameter

\\server\new$

the path will get truncated one time by the newline '\n' and the dollar
sign will by cut off.

Then putting it in the variable $x the statement

mkdir( $x, 0777 );

will fail!

I would like to use the script as a subroutine which will get the path -
this have to be done as \\server\\share\new_directory. So it is not
possible to use an other syntax!

Any suggestions???

Thanks in advance

Tim


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: (no subject)

2003-03-19 Thread JamesTillman
Try server\\new\$

In perl you escape meta-characters with backslashes.  Not much fun when you
discover that Win32 just loves backslashes!

jpt

 -Original Message-
 From: Tim Straub [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 19, 2003 7:10 AM
 To: [EMAIL PROTECTED]
 Subject: (no subject)
 
 
 Hi list,
 
 is there any way to open a hidden UNC path with the mkdir statement
 given by a parameter.
 
 Let's say I run the script with the parameter
 
 \\server\new$
 
 the path will get truncated one time by the newline '\n' and 
 the dollar
 sign will by cut off.
 
 Then putting it in the variable $x the statement
 
 mkdir( $x, 0777 );
 
 will fail!
 
 I would like to use the script as a subroutine which will get 
 the path -
 this have to be done as \\server\\share\new_directory. So it is not
 possible to use an other syntax!
 
 Any suggestions???
 
 Thanks in advance
 
 Tim
 
 
 ___
 Perl-Win32-Users mailing list
 [EMAIL PROTECTED]
 To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
 
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: UNC Path (hidden) in Variable With MKDIR, was (no subject)

2003-03-19 Thread Tim Straub
   
 [EMAIL PROTECTED] 
 .state.fl.us  
An 
 19.03.2003 13:20   [EMAIL PROTECTED],  
[EMAIL PROTECTED] 
ate.com
 Kopie 
   
 Thema 
RE: (no subject)   
   
   
   
   
   
   






Hi,

unfortunately the syntax have to be something like \\server\share
$\new_directory.
This script will get the values from an INI-file or by computing it during
an user creating process.

Maybe there is the possibility to use a regex - but I didn't get the dollar
sign out of the path.

Thanks,

Tim

Try server\\new\$

In perl you escape meta-characters with backslashes.  Not much fun when you
discover that Win32 just loves backslashes!

jpt

 -Original Message-
 From: Tim Straub [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 19, 2003 7:10 AM
 To: [EMAIL PROTECTED]
 Subject: (no subject)


 Hi list,

 is there any way to open a hidden UNC path with the mkdir statement
 given by a parameter.

 Let's say I run the script with the parameter

 \\server\new$

 the path will get truncated one time by the newline '\n' and
 the dollar
 sign will by cut off.

 Then putting it in the variable $x the statement

 mkdir( $x, 0777 );

 will fail!

 I would like to use the script as a subroutine which will get
 the path -
 this have to be done as \\server\\share\new_directory. So it is not
 possible to use an other syntax!

 Any suggestions???

 Thanks in advance

 Tim


 ___
 Perl-Win32-Users mailing list
 [EMAIL PROTECTED]
 To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
 



___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Functions for clearing screen

2003-03-19 Thread Koteshwar Rao A

Can any one tell me functions same as CD dir , dir commands in DOS

and for clearing screen 

Thanx in advance

--Eswar.

-Original Message-
From: $Bill Luebkert [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 3:45 PM
To: Koteshwar Rao A
Cc: 'Beckett Richard-qswi266'; [EMAIL PROTECTED]
Subject: Re: Problem with Net::FTP


Koteshwar Rao A wrote:
 Thank you  for the first question.
 
 Is there any answer for second question,by using PPM.

Try this - will list or make a bat file to reinstall them:

#!perl -w --

use strict;
use PPM;
use Data::Dumper; $Data::Dumper::Indent=1;

our %A;
$| = 1; binmode STDOUT;

# get command line switches - need 'our %A'/'use vars %A' before include

for (my $ii = 0; $ii  @ARGV; ) {
last if $ARGV[$ii] =~ /^--$/;
if ($ARGV[$ii] !~ /^-{1,2}(.*)$/) { # if not switch
$ii++; next;# ignore
}
my $arg = $1;
splice @ARGV, $ii, 1;   # remove arg
if ($arg =~ /^([\w]+)=(.*)$/) { # if assign
$A{$1} = $2;
} else {# boolean
$A{$1}++;
}
}

my $batname = c:/tmp/ppmmodsinstalled.bat;
my $usage = EOD;

Usage: $0 [-b]
-b  build bat file (def: $batname)

EOD
die $usage if $A{h} or $A{help};

if ($A{b}) {

# list modules installed via PPM (and make bat file to reproduce it)

my %rep = PPM::ListOfRepositories() or die No repositoies ???: $!;

open BAT,  $batname or die Failed to open $batname: $!\n;
print BAT '@echo off',\n;
foreach (sort keys %rep) {
print BAT perl -S ppm set repository $_ $rep{$_}\n;
print perl -S ppm set repository $_ $rep{$_}\n;
}

if (0) {

my %inst = PPM::QueryInstalledPackages() or
  die Nothing installed ???: $!;
foreach (keys %inst) {
print BAT perl -S ppm install $_\n;
print perl -S ppm install $_\n;
}

} else {

my %inst = PPM::InstalledPackageProperties() or
  die Nothing installed ???: $!;
foreach (sort keys %inst) {

if (ref ($inst{$_}) !~ /hash/i) {
print \t$_ = $inst{$_}\n;
next;
}
my $props = $inst{$_};
print BAT REM $_ Version: , $props-{VERSION}, \n;
print BAT perl -S ppm install $_\n;
print BAT \n;
print REM $_ Version: , $props-{VERSION}, \n;
print perl -S ppm install $_\n;
print \n;
}

}
close BAT or die Failed to close $batname: $!\n;
exit;
}

# print out PPM installed modules and info

print PPM Installed Module Properties\n\n;
my %props = PPM::InstalledPackageProperties();

foreach (sort keys %props) {

if (ref ($props{$_}) !~ /hash/i) {
print \t$_ = $props{$_}\n;
next;
}
print $_:\n;
my $props = $props{$_};

# example output:

# libwww-perl:
#ABSTRACT = Library for WWW access in Perl
#AUTHOR = Gisle Aas [EMAIL PROTECTED]
#DATE = Fri Oct 2 16:15:15 1998
#DEPEND:
#HTML-Parser
#URI
#NAME = libwww-perl
#PERLCORE_VER = undef
#TITLE = libwww-perl
#VERSION = 5,51,0,0

foreach (sort keys %$props) {

my $line = $props-{$_};
if (defined $line) {

chomp $line;
if (ref ($line) =~ /ARRAY/i) {

printf \t$_:\n;
foreach (@$line) {
chomp;
printf \t\t$_\n;
}
} else {

$line =~ s/\r?\n\r?/ /gs;
$line =~ s/\n\/\n/s;
$line =~ s/\s+/ /g;
$line = sprintf $_ = %s, $line;
$line =~ s/(.{1,71}($|\s))/\t\t$1\n/g;
$line =~ s/^\s+//;
$line =~ s/\s+$//;
printf \t%s\n, $line;
}
} else {
print \t$_ = undef\n;
}
}
}

__END__



-- 
   ,-/-  __  _  _ $Bill Luebkert   ICQ=162126130
  (_/   /  )// //   DBE Collectibles   Mailto:[EMAIL PROTECTED]
   / ) /--  o // //  http://dbecoll.tripod.com/ (Free site for Perl)
-/-' /___/__/_/_ Castle of Medieval Myth  Magic
http://www.todbe.com/

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Functions for clearing screen

2003-03-19 Thread Beckett Richard-qswi266
Please stop CCing me, I read the list.

Thanks.

R.
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Scripting for MOM

2003-03-19 Thread Stanley . G . Martin
Has anyone done any scripting for the Microsoft Operations Manager (MOM)
yet?  I just started to eval it for my group here in Sprint and was
wondering if it was going to be very flexible, where I could add my own
scripts to it.

Stanley G. Martin
Sprint - EISĀ³ Customer Care
[EMAIL PROTECTED]

attachment: WINMAIL.DAT

Re: How do one determine the amount of memory used by an process withinperl

2003-03-19 Thread Thomas R Wyant_III

Mundell, R. \(Ronald\) [EMAIL PROTECTED] wrote:

 I am busy writing a script that will determine the status of an
application.
 I also need to determine the amount of memory used by such an
application.
 If anyone knows how to do this within perl please help. This solution
needs
 to be platform independent.

Well, it depends on what you mean by platform independent. All the
off-the-shelf modules I know of to get memory use under Windows start with
Win32::, so that argues that there's no such beast readily available.

On the other hand, a lot of the Perl modules we think of as being
platform-independent work by being platform-dependent, but hiding that
dependence from the user. File::Spec is an example that comes readily to
mind. If I were in your shoes I would write my own superclass, and then
subclass or delegate as needed based on the contents of $^O.

Of course, when you get to $^O eq 'MSWin32' you have the same problem over
again, since there is _no_ way I know of that works with every conceivable
flavor. WMI is their current darling, but is it available and has it been
retrofitted to all the systems you're worried about? If not, the APIs for
NT and non-NT are different, and you'll need to provide both if you have
both.

Tom Wyant



This communication is for use by the intended recipient and contains 
information that may be privileged, confidential or copyrighted under
applicable law.  If you are not the intended recipient, you are hereby
formally notified that any use, copying or distribution of this e-mail,
in whole or in part, is strictly prohibited.  Please notify the sender
by return e-mail and delete this e-mail from your system.  Unless
explicitly and conspicuously designated as E-Contract Intended,
this e-mail does not constitute a contract offer, a contract amendment,
or an acceptance of a contract offer.  This e-mail does not constitute
a consent to the use of sender's contact information for direct marketing
purposes or for transfers of data to third parties.

 Francais Deutsch Italiano  Espanol  Portugues  Japanese  Chinese  Korean

http://www.DuPont.com/corp/email_disclaimer.html


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Delete

2003-03-19 Thread Krishna, Hari
Hello friends,
I have written a perl program that downloads the files (basically
ftp in a batch program) from the unix systems to windows. These files
contain the ping information to various unix systems that we use. The
program then calculates the uptime and downtime quarterly for these systems.
everything looks good.

Having said that, once I download the files from unix box, I would want to
delete those files that I just ftped to my windows folder, from the unix, in
the same batch file or perl file. Is it possible?

2) how do I login to unix from windows?

3) How do I start script on unix from windows?

any help appreciated.

Thanks,
Hari.

CONFIDENTIALITY NOTICE:
This e-mail message, including all attachments, is for the sole use of the
intended recipient(s) and may contain confidential and privileged
information. You may NOT use, disclose, copy or disseminate this
information.  If you are not the intended recipient, please contact the
sender by reply e-mail immediately.  Please destroy all copies of the
original message and all attachments. Your cooperation is greatly
appreciated. 
Columbus Regional Hospital
2400 East 17th Street 
Columbus, Indiana 47201
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Delete

2003-03-19 Thread Morley, Philip
To answer your lat two questions use telnet.

I believe there is a Perl module, Net::Telnet available form ppm/CPAN
although I have never used it myself.

Regards,

Phil.



-Original Message-
From: Krishna, Hari [mailto:[EMAIL PROTECTED]
Sent: 19 March 2003 13:54
To: [EMAIL PROTECTED]
Subject: Delete


Hello friends,
I have written a perl program that downloads the files (basically
ftp in a batch program) from the unix systems to windows. These files
contain the ping information to various unix systems that we use. The
program then calculates the uptime and downtime quarterly for these systems.
everything looks good.

Having said that, once I download the files from unix box, I would want to
delete those files that I just ftped to my windows folder, from the unix, in
the same batch file or perl file. Is it possible?

2) how do I login to unix from windows?

3) How do I start script on unix from windows?

any help appreciated.

Thanks,
Hari.

CONFIDENTIALITY NOTICE:
This e-mail message, including all attachments, is for the sole use of the
intended recipient(s) and may contain confidential and privileged
information. You may NOT use, disclose, copy or disseminate this
information.  If you are not the intended recipient, please contact the
sender by reply e-mail immediately.  Please destroy all copies of the
original message and all attachments. Your cooperation is greatly
appreciated. 
Columbus Regional Hospital
2400 East 17th Street 
Columbus, Indiana 47201
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

This e-mail and any attachment is for authorised use by the intended recipient(s) 
only.  It may contain proprietary material, confidential information and/or be subject 
to legal privilege.  It should not be copied, disclosed to, retained or used by, any 
other party.  If you are not an intended recipient then please promptly delete this 
e-mail and any attachment and all copies and inform the sender.  Thank you.
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Delete

2003-03-19 Thread Krishna, Hari
Thanks to all for the delete (I was using the rm command as would one use in
unix.. ) command. ;(

But how do I login to Unix and start or stop a script from running, through
a program, like perl?

-Original Message-
From: $Bill Luebkert [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 9:05 AM
To: Krishna, Hari
Cc: [EMAIL PROTECTED]
Subject: Re: Delete


Krishna, Hari wrote:
 Hello friends,
   I have written a perl program that downloads the files (basically
 ftp in a batch program) from the unix systems to windows. These files
 contain the ping information to various unix systems that we use. The
 program then calculates the uptime and downtime quarterly for these
systems.
 everything looks good.
 
 Having said that, once I download the files from unix box, I would want to
 delete those files that I just ftped to my windows folder, from the unix,
in
 the same batch file or perl file. Is it possible?
 
 2) how do I login to unix from windows?
 
 3) How do I start script on unix from windows?
 
 any help appreciated.

FTP has a delete command.


-- 
   ,-/-  __  _  _ $Bill Luebkert   ICQ=162126130
  (_/   /  )// //   DBE Collectibles   Mailto:[EMAIL PROTECTED]
   / ) /--  o // //  http://dbecoll.tripod.com/ (Free site for Perl)
-/-' /___/__/_/_ Castle of Medieval Myth  Magic
http://www.todbe.com/


CONFIDENTIALITY NOTICE:
This e-mail message, including all attachments, is for the sole use of the
intended recipient(s) and may contain confidential and privileged
information. You may NOT use, disclose, copy or disseminate this
information.  If you are not the intended recipient, please contact the
sender by reply e-mail immediately.  Please destroy all copies of the
original message and all attachments. Your cooperation is greatly
appreciated. 
Columbus Regional Hospital
2400 East 17th Street 
Columbus, Indiana 47201
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Delete

2003-03-19 Thread Thomas R Wyant_III

Krishna, Hari [EMAIL PROTECTED] wrote:

 I have written a perl program that downloads the files (basically
 ftp in a batch program) from the unix systems to windows. These files
 contain the ping information to various unix systems that we use. The
 program then calculates the uptime and downtime quarterly for these
systems.
 everything looks good.

 Having said that, once I download the files from unix box, I would want
to
 delete those files that I just ftped to my windows folder, from the unix,
in
 the same batch file or perl file. Is it possible?

 2) how do I login to unix from windows?

 3) How do I start script on unix from windows?

You need an account with write access to delete the files. Why not just use
that account for the FTP operation, and use the FTP 'delete' command?

Tom Wyant



This communication is for use by the intended recipient and contains 
information that may be privileged, confidential or copyrighted under
applicable law.  If you are not the intended recipient, you are hereby
formally notified that any use, copying or distribution of this e-mail,
in whole or in part, is strictly prohibited.  Please notify the sender
by return e-mail and delete this e-mail from your system.  Unless
explicitly and conspicuously designated as E-Contract Intended,
this e-mail does not constitute a contract offer, a contract amendment,
or an acceptance of a contract offer.  This e-mail does not constitute
a consent to the use of sender's contact information for direct marketing
purposes or for transfers of data to third parties.

 Francais Deutsch Italiano  Espanol  Portugues  Japanese  Chinese  Korean

http://www.DuPont.com/corp/email_disclaimer.html


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Delete

2003-03-19 Thread Ross Matt-QMR000
A cheesy way to remove the file on the Unix system inside of your FTP.
 Step 01 Change the windows directory to a different location where the
filenames that you just pulled down do not live.
 Step 02 Cycle though all the filename that are on the Unix side issuing the
put FILENAME command this will over write the files with nothing  file,
this removes the file on the Unix side.  cheesy ...  yes  .. but you are
still in the same program.

hope it helps
Matt Ross
Configuration Management ePIMS
Wk: 817.245.6540
2 way pager: 888.468.0815
E-mail:  [EMAIL PROTECTED]



-Original Message-
From: Krishna, Hari [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 8:20 AM
To: [EMAIL PROTECTED]
Subject: RE: Delete


Thanks to all for the delete (I was using the rm command as would one use in
unix.. ) command. ;(

But how do I login to Unix and start or stop a script from running, through
a program, like perl?

-Original Message-
From: $Bill Luebkert [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 9:05 AM
To: Krishna, Hari
Cc: [EMAIL PROTECTED]
Subject: Re: Delete


Krishna, Hari wrote:
 Hello friends,
   I have written a perl program that downloads the files (basically
 ftp in a batch program) from the unix systems to windows. These files
 contain the ping information to various unix systems that we use. The
 program then calculates the uptime and downtime quarterly for these
systems.
 everything looks good.
 
 Having said that, once I download the files from unix box, I would want to
 delete those files that I just ftped to my windows folder, from the unix,
in
 the same batch file or perl file. Is it possible?
 
 2) how do I login to unix from windows?
 
 3) How do I start script on unix from windows?
 
 any help appreciated.

FTP has a delete command.


-- 
   ,-/-  __  _  _ $Bill Luebkert   ICQ=162126130
  (_/   /  )// //   DBE Collectibles   Mailto:[EMAIL PROTECTED]
   / ) /--  o // //  http://dbecoll.tripod.com/ (Free site for Perl)
-/-' /___/__/_/_ Castle of Medieval Myth  Magic
http://www.todbe.com/


CONFIDENTIALITY NOTICE:
This e-mail message, including all attachments, is for the sole use of the
intended recipient(s) and may contain confidential and privileged
information. You may NOT use, disclose, copy or disseminate this
information.  If you are not the intended recipient, please contact the
sender by reply e-mail immediately.  Please destroy all copies of the
original message and all attachments. Your cooperation is greatly
appreciated. 
Columbus Regional Hospital
2400 East 17th Street 
Columbus, Indiana 47201
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Couple questions (alarm(), nested loops)

2003-03-19 Thread FARRINGTON, RYAN
Title: Couple questions (alarm(), nested loops)





ok does ActiveState implement something like alarm() in the win32 version? 


and if I have nested loops:


foreach $var(@vars){


 foreach $stuff (@stuffs){


 }


}


how do I make the second loop force the first loop to go to the next instance. I know next works in the first loop but if I do that in the second it only affects the second loop =(




RE: Couple questions (alarm(), nested loops)

2003-03-19 Thread Joseph P. Discenza
Please post in plain text if you can. It makes it easier to reply.

FARRINGTON, RYAN wrote, on Wednesday, March 19, 2003 10:14
: ok does ActiveState implement something like alarm() in the win32 version? 

IIRC, they don't. Someone else may have better information (5.8?) than I do.

: and if I have nested loops: 
: how do I make the second loop force the first loop to go to the next instance. I 
know next : works in the first loop but if I do that in the second it only affects the 
second loop =(

Used named loops:

OUTER:
: foreach $var(@vars){ 
: foreach $stuff (@stuffs){ 

next OUTER if done_with_this_iteration;

: } 
: } 

Good luck,

Joe

==
  Joseph P. Discenza, Sr. Programmer/Analyst
   mailto:[EMAIL PROTECTED]
 
  Carleton Inc.   http://www.carletoninc.com
  574.243.6040 ext. 300fax: 574.243.6060
 
Providing Financial Solutions and Compliance for over 30 Years
* Please note that our Area Code has changed to 574! * 

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: (no subject)

2003-03-19 Thread Gerber, Christopher J
Tim,

AFAIK, the mkdir command can only make subdirectories, not new shared
folders.  Making shares is covered very well in Roth's Win32 Perl
Programming, pages 70-78.  To create a share, take a look at
Win32::NetResource::NetShareAdd or Win32::Lanman::NetShareAdd.  Here's a
sample:

use Win32::NetResource;
my %Share = (
  'path'= 'C:\\TEMP',
  'maxusers'= 1,
  'netname' = 'Temp$',
  'remark'  = 'Hidden Share of TEMP',
  'passwd'  = '',
  'permissions' = 0
);
my $Param;
my $Machine='Server';
if( Win32::NetResource::NetShareAdd( \%Share, $Param, $Machine ) {
  print Success\n;
}

The above code is untested.

Chris

 -Original Message-
 From: Tim Straub [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 19, 2003 7:10 AM
 To: [EMAIL PROTECTED]
 Subject: (no subject)
 
 
 Hi list,
 
 is there any way to open a hidden UNC path with the mkdir statement
 given by a parameter.
 
 Let's say I run the script with the parameter
 
 \\server\new$
 
 the path will get truncated one time by the newline '\n' and 
 the dollar
 sign will by cut off.
 
 Then putting it in the variable $x the statement
 
 mkdir( $x, 0777 );
 
 will fail!
 
 I would like to use the script as a subroutine which will get 
 the path -
 this have to be done as \\server\\share\new_directory. So it is not
 possible to use an other syntax!
 
 Any suggestions???
 
 Thanks in advance
 
 Tim
 
 
 ___
 Perl-Win32-Users mailing list
 [EMAIL PROTECTED]
 To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
 


LEGAL NOTICE
Unless expressly stated otherwise, this message is confidential and may be privileged. 
It is intended for the addressee(s) only. Access to this E-mail by anyone else is 
unauthorized. If you are not an addressee, any disclosure or copying of the contents 
of this E-mail or any action taken (or not taken) in reliance on it is unauthorized 
and may be unlawful. If you are not an addressee, please inform the sender immediately.
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


TR: Re:cr/lf in perl

2003-03-19 Thread JGONCALV


 Hi, i have this:
 
 #perl
 use strict;
 use warnings;
 
 while ( DATA ) {
 chomp;
 my data = map { s/^\s+//; s/\s+$//; $_ } split /;/;
 reformat ( data );
 }
 
 
 sub reformat {
 
 format =
 PROBTRAC: Continuous Problem Tracking System Submittal Form
 !crstatus = 
 shift
 !severity: 
 shift
 !priority: 
 shift
 !problem_synopsis: 
 shift
 !problem_description: !text
 ^
 my $temp = shift
 ^~~
 $temp
 !end_text
 !submitter: 
 shift
 
 .
 
 write;
 }
 
 In fact i wanted to go to the line in the problem description section if
 there is more than one transitionned to like this
 
 How can i do this in perl thanks? 
 
 This is an exemple:
 
 
 
 __DATA__
 entered;Medium;Major;This is an example synopsis;Transitionned to entered
 by iuzan to W_BUSFOR_QUAL on 17/3/2003 11:25:25 Transitionned to assigned
 by iuzan to W_BUSFOR_QUAL on 17/3/2003 11:25:25 ;toto
 standby;Urgent;Minor;This is an example synopsis2;Transitionned to entered
 by iuzan to W_BUSFOR_QUAL on 17/3/2003 11:25:25 ;toto2
 
 output:
 
 PROBTRAC: Continuous Problem Tracking System Submittal Form
 !crstatus = entered
 !severity: Medium
 !priority: Major
 !problem_synopsis: This is an example synopsis
 !problem_description: !text
 Transitionned to entered by iuzan to W_BUSFOR_QUAL on 17/3/2003 11:25:25
 Transitionned to assigned by iuzan to W_BUSFOR_QUAL on 17/3/2003 11:25:25
 
 !end_text
 !submitter: toto
 
 PROBTRAC: Continuous Problem Tracking System Submittal Form
 !crstatus = standby
 !severity: Urgent
 !priority: Minor
 !problem_synopsis: This is an example synopsis2
 !problem_description: !text
 Transitionned to assigned by iuzan to W_BUSFOR_QUAL on 17/3/2003 11:25:25 
 !end_text
 !submitter: toto2
 
 
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Scripting for MOM

2003-03-19 Thread Eli Jehoel
Your message was encoded in RTF, and as a Microsoft Outlook user I have
to open your message as an attachment with Microsoft Word. 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 2:29 PM
To: 'perl-win32-users'
Subject: Scripting for MOM



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.463 / Virus Database: 262 - Release Date: 3/17/2003

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.463 / Virus Database: 262 - Release Date: 3/17/2003
 

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: RE: (no subject)

2003-03-19 Thread Tim Straub

Dear Christopher,

the share is already available. It is only the subdirectory which I need.

Tim



   
 Gerber,  
 Christopher J
 Christopher.J.Ge  An 
 [EMAIL PROTECTED]   'Tim Straub' 
[EMAIL PROTECTED],
 19.03.2003 17:39   [EMAIL PROTECTED] 
ate.com
 Kopie 
   
 Thema 
RE: (no subject)   
   
   
   
   
   
   




Tim,

AFAIK, the mkdir command can only make subdirectories, not new shared
folders.  Making shares is covered very well in Roth's Win32 Perl
Programming, pages 70-78.  To create a share, take a look at
Win32::NetResource::NetShareAdd or Win32::Lanman::NetShareAdd.  Here's a
sample:

use Win32::NetResource;
my %Share = (
  'path'= 'C:\\TEMP',
  'maxusers'= 1,
  'netname' = 'Temp$',
  'remark'  = 'Hidden Share of TEMP',
  'passwd'  = '',
  'permissions' = 0
);
my $Param;
my $Machine='Server';
if( Win32::NetResource::NetShareAdd( \%Share, $Param, $Machine ) {
  print Success\n;
}

The above code is untested.

Chris

 -Original Message-
 From: Tim Straub [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 19, 2003 7:10 AM
 To: [EMAIL PROTECTED]
 Subject: (no subject)


 Hi list,

 is there any way to open a hidden UNC path with the mkdir statement
 given by a parameter.

 Let's say I run the script with the parameter

 \\server\new$

 the path will get truncated one time by the newline '\n' and
 the dollar
 sign will by cut off.

 Then putting it in the variable $x the statement

 mkdir( $x, 0777 );

 will fail!

 I would like to use the script as a subroutine which will get
 the path -
 this have to be done as \\server\\share\new_directory. So it is not
 possible to use an other syntax!

 Any suggestions???

 Thanks in advance

 Tim


 ___
 Perl-Win32-Users mailing list
 [EMAIL PROTECTED]
 To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



LEGAL NOTICE
 Unless expressly stated otherwise, this message is confidential and may be
 privileged. It is intended for the addressee(s) only. Access to this
 E-mail by anyone else is unauthorized. If you are not an addressee, any
 disclosure or copying of the contents of this E-mail or any action taken
 (or not taken) in reliance on it is unauthorized and may be unlawful. If
 you are not an addressee, please inform the sender immediately.



___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: UNC Path (hidden) in Variable With MKDIR, was (no subject)

2003-03-19 Thread JamesTillman


 -Original Message-
 From: Tim Straub [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, March 19, 2003 7:42 AM
 To: [EMAIL PROTECTED]
 Subject: RE: UNC Path (hidden) in Variable With MKDIR, was 
 (no subject)

  Try server\\new\$
 
 unfortunately the syntax have to be something like \\server\share
 $\new_directory.
 This script will get the values from an INI-file or by 
 computing it during
 an user creating process.
 
 Maybe there is the possibility to use a regex - but I didn't 
 get the dollar
 sign out of the path.

Well, if you're reading the string from a file, then you won't have the
problems with the $ or the \n being recognized as escape characters.  I
guess I don't understand what your problem is.  Have you actually run code
that reads from an INI file?  Did it still produce the behavior you
described -- a carriage return in the string and the dollar sign missing?
If so, are you doing some sort of eval on that string?  If you are, then
you'll need to escape the backslashes and dollar signs yourself before doing
the eval.  If not, you shouldn't be experiencing a problem.

If you are able to provide the code in question, that would make it much
easier to help you.

jpt
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Problem with Net::FTP

2003-03-19 Thread Carl Jolley
On Wed, 19 Mar 2003, Koteshwar Rao A wrote:


 Hai ,

 My name is eswar , I am in a process of automating the ftp process from
 a windows worstation to Unix server,

 When I am using this Net::Ftp for this , I am getting the  following
 error,

 Can't locate object method Use via package Net::ftp(perhaps you
 forgot to load Net::ftp?)

  Is there any problem with the Perl package that is installed???

 Second question : How do I get the information about the modules that
 are loaded in existing Perl ..

 Can anyone help me in getting out of this problem , Thanx in advance


Check your capitalization carefully. It's 'use' and Net::FTP.

 [EMAIL PROTECTED] Carl Jolley
 All opinions are my own and not necessarily those of my employer 

___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Win32-API 0.41 Compile and install help

2003-03-19 Thread Adam Frielink
I cannot find a PPM for this and when I compile it with VC++ v6 standard, I
keep getting failed tests during the 'nmake test' stage.

C:\Documents and
Settings\Adam\Desktop\Win32-API-0.41.tar\Win32-API-0.41perl Ma
kefile.pl
Writing Makefile for Win32::API::Callback
Writing Makefile for Win32::API

C:\Documents and
Settings\Adam\Desktop\Win32-API-0.41.tar\Win32-API-0.41nmake

Microsoft (R) Program Maintenance Utility Version 7.00.9466
Copyright (C) Microsoft Corporation.  All rights reserved.





cl -c-nologo -Gf -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_ST
RICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PER
LIO
-DPERL_MSVCRT_READFIX -MD -Zi -DNDEBUG -O1-DVERSION=\0.41\  -DXS_VERSI
ON=\
0.41\  -IC:\Perl\lib\CORE   Callback.c
cl : Command line warning D4029 : optimization is not available in the
standard
edition compiler
Callback.c
Callback.xs(332) : warning C4101: 'checkpoint' : unreferenced local variable
Callback.xs(333) : warning C4101: 'size' : unreferenced local variable
Callback.xs(510) : warning C4018: '' : signed/unsigned mismatch
Callback.xs(609) : warning C4018: '' : signed/unsigned mismatch
Callback.xs(826) : warning C4101: 'intypes' : unreferenced local variable
Callback.xs(815) : warning C4101: 'pParam' : unreferenced local variable
Callback.xs(815) : warning C4101: 'pParam' : unreferenced local variable
Callback.xs(823) : warning C4101: 'obj_intypes' : unreferenced local
variable
Callback.xs(811) : warning C4101: 'lParam' : unreferenced local variable
Callback.xs(814) : warning C4101: 'cParam' : unreferenced local variable
Callback.xs(816) : warning C4101: 'ppParam' : unreferenced local variable
Callback.xs(813) : warning C4101: 'dParam' : unreferenced local variable
Callback.xs(820) : warning C4101: 'obj_proto' : unreferenced local variable
Callback.xs(810) : warning C4101: 'iParam' : unreferenced local variable
Callback.xs(812) : warning C4101: 'fParam' : unreferenced local variable
Callback.xs(882) : warning C4101: 'selfpos' : unreferenced local variable
Running Mkbootstrap for Win32::API::Callback ()
C:\Perl\bin\perl.exe -MExtUtils::Command -e chmod 644 Callback.bs




link -out:..\blib\arch\auto\Win32\API\Callback\Callback.dll -dll -nologo
 -nodefaultlib -debug -opt:ref,icf  -libpath:C:\Perl\lib\CORE  -machine:x8
6 Ca
llback.obj   C:\Perl\lib\CORE\perl58.lib oldnames.lib kernel32.lib
user32.lib gd
i32.lib winspool.lib  comdlg32.lib advapi32.lib shell32.lib ole32.lib
oleaut32.l
ib  netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib  version.lib
odbc32.lib
odbccp32.lib msvcrt.lib -def:Callback.def
   Creating library ..\blib\arch\auto\Win32\API\Callback\Callback.lib and
object
 ..\blib\arch\auto\Win32\API\Callback\Callback.exp
C:\Perl\bin\perl.exe -MExtUtils::Command -e chmod 755
..\blib\arch\auto\
Win32\API\Callback\Callback.dll
C:\Perl\bin\perl.exe -MExtUtils::Command -e cp Callback.bs
..\blib\arch\
auto\Win32\API\Callback\Callback.bs
C:\Perl\bin\perl.exe -MExtUtils::Command -e chmod 644
..\blib\arch\auto\
Win32\API\Callback\Callback.bs




cl -c-nologo -Gf -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_ST
RICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PER
LIO
-DPERL_MSVCRT_READFIX -MD -Zi -DNDEBUG -O1-DVERSION=\0.41\  -DXS_VERSI
ON=\
0.41\  -IC:\Perl\lib\CORE   API.c
cl : Command line warning D4029 : optimization is not available in the
standard
edition compiler
API.c
API.xs(305) : warning C4244: '=' : conversion from 'NV' to 'float', possible
los
s of data
API.xs(220) : warning C4101: 'cParam' : unreferenced local variable
API.xs(216) : warning C4101: 'iParam' : unreferenced local variable
API.xs(206) : warning C4101: 'callbacks' : unreferenced local variable
API.xs(205) : warning C4101: 'structs' : unreferenced local variable
Running Mkbootstrap for Win32::API ()
C:\Perl\bin\perl.exe -MExtUtils::Command -e chmod 644 API.bs




link -out:blib\arch\auto\Win32\API\API.dll -dll -nologo -nodefaultlib -d
ebug -opt:ref,icf  -libpath:C:\Perl\lib\CORE  -machine:x86 API.obj
C:\Perl\l
ib\CORE\perl58.lib oldnames.lib kernel32.lib user32.lib gdi32.lib
winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib  netapi32.lib
uuid.
lib wsock32.lib mpr.lib winmm.lib  version.lib odbc32.lib odbccp32.lib
msvcrt.li
b -def:API.def
   Creating library blib\arch\auto\Win32\API\API.lib and object
blib\arch\auto\W
in32\API\API.exp
C:\Perl\bin\perl.exe -MExtUtils::Command -e chmod 755
blib\arch\auto\Win
32\API\API.dll
C:\Perl\bin\perl.exe -MExtUtils::Command -e cp API.bs
blib\arch\auto\Win
32\API\API.bs
C:\Perl\bin\perl.exe -MExtUtils::Command -e chmod 644
blib\arch\auto\Win
32\API\API.bs

C:\Documents and
Settings\Adam\Desktop\Win32-API-0.41.tar\Win32-API-0.41nmake t
est

Microsoft (R) Program Maintenance Utility Version 7.00.9466
Copyright (C) Microsoft Corporation.  All rights reserved.





link 

(OT) Catchall DNS?

2003-03-19 Thread Steve Karr
%% OFF TOPIC %%

I know this is off topic, but I can't find the answer myself, and I'm sure someone on this list will know, so I'm asking.  Please some yell at me ;)

Does anyone know how to configure BIND DNS Server like a catchall email address?

I know how to do it with CNAMES (*), but not for domain names themselves.

I'd like to be able to register a name - set/point it to my name servers and have it work - without having to explicitly add an entry for it until I want it do something specific.  Kind of like park pages.  Ok, exactly like park pages.  This is done through DNS, right, or am I missing something?  I have domains that I've got registered that I just haven't had the time to create an entry for them in my DNS server, so when someone goes to them 
- or shall I say ATTEMPTS to go to them - they get the fun li'l dns error.

Any clues on how to accomplish this like the domain registrars?  Thanks!

- Steve
(RedHat 7.2  Apache  Bind 9 - fyi)
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs