DBI eating memory ?

2004-11-15 Thread Ing. Branislav Gerzo
Hi all,

I am playing with Parallel::ForkManager, but I have one interesting
question. When I run script bellow it uses too much memory - it seems
to me, that child thread doesn't free all memory it used. On 100th
iteration it uses around 18MB, after 200th it uses around 29MB! Could
anyone explain me why is that, and where is error in my script ? If I
don't use DBI stuff in child threads everything is ok. Is there some
dbh destructor, which I'm missing ? I use activestate perl 5.8.4 and
latest ForkManager

# this is just example script
use strict;
use warnings;
use Parallel::ForkManager;
use DBI;

my @links=(1..1000);
my $pm=new Parallel::ForkManager(5);

foreach my $x (0..$#links) {
$pm->start and next;
my $dbh = DBI->connect("DBI:mysql:database=customers;
host=localhost;port=3306", "", "")
or die "Can't connect: ", $DBI::errstr; 
  $dbh->{RaiseError} = 1;
print "$links[$x]\n";
  # do something (read, update, insert from db)
  $dbh->disconnect;
$pm->finish;
}

thanks for any help!
 
--

 --. ,--  ,- ICQ: 7552083  \|||/`//EB: www.2ge.us
,--' |  - |--IRC: [2ge](. .),\\SN: 2ge!2ge_us
`+==+=+===~  ~=-o00-(_)-00o-~
A poor man is one who gets his money by earning it.
 

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


UTF-8 => CP1251

2004-11-15 Thread Savkin Denis
Hi there!
I have a string with UTF-8 encoding. I need to convert it to CP1251 without using modules like 
Encoding. I can't understand how to works pack/unpack.
Help me please!

P.S.
Sorry for my english...
---
Professional hosting for everyone - http://www.host.ru
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Redirecting output (print) to

2004-11-15 Thread $Bill Luebkert
Glenn Linderman wrote:

> On approximately 11/15/2004 6:47 PM, came the following characters from 
> the keyboard of Leroy G. Blimegger Jr.:
> 
>>Hello All,
>>
>>I have a perl script that can be run from a command prompt or from a VB
>>application. There is a command line switch (f) that determines whether the
>>script is running from a command prompt or if it was called from the VB
>>script. If $opt_f  eq 2, then I direct the output of the script via $socket
>>to the VB frontend. However, if the script is called from the command
>>prompt, I want the output displayed normally (in the command window). 
>>
>>Sending the output to the VB frontend works fine, but I can't figure out how
>>to send the output to the command window if the script is called from a
>>command prompt. 
>>
>>if ($opt_f eq 2) {
>>  use IO::socket;
>>  $remote_host = "127.0.0.1";
>>  $remote_port = "1";
>>  $socket = IO::Socket::INET->new(PeerAddr => $remote_host,
>>  PeerPort => $remote_port,
>>  Proto=> "tcp",
>>  Type => SOCK_STREAM)
>>  or die "Couldn't connect to $remote_host:$remote_port :
>>[EMAIL PROTECTED]";
>>} else {
>>  $socket = ;
> 
>  open ( $socket, '>', ">STDOUT" ); # untested

I would think this would be easier :

$socket = \*STDOUT;

I'm assuming that whatever you are going to use $socket for can handle
a FH ref.  If not, then you could change the print below to something like :

if ($opt_f eq '2') {
print $socket ("Some Output\n");
} else {
print "Some Output\n";
}

where you print to a socket in one case or STDOUT in another.  A third
possiblity would be to use a sub to handle it - like my_print instead
of print and do the test there.

>>}
>>.
>>.
>>.
>>print $socket ("Some Output\n");


-- 
  ,-/-  __  _  _ $Bill LuebkertMailto:[EMAIL PROTECTED]
 (_/   /  )// //   DBE CollectiblesMailto:[EMAIL PROTECTED]
  / ) /--<  o // //  Castle of Medieval Myth & Magic http://www.todbe.com/
-/-' /___/_<_http://dbecoll.tripod.com/ (My Perl/Lakers stuff)
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Redirecting output (print) to

2004-11-15 Thread Leroy G. Blimegger Jr.
Thanks!!

$socket = \*STDOUT;

Is what I was looking for!!

Lee


-Original Message-
From: $Bill Luebkert [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 16, 2004 12:29 PM
To: [EMAIL PROTECTED]
Cc: Perl Win32 Forum (ActiveState)
Subject: Re: Redirecting output (print) to 

Glenn Linderman wrote:

> On approximately 11/15/2004 6:47 PM, came the following characters from 
> the keyboard of Leroy G. Blimegger Jr.:
> 
>>Hello All,
>>
>>I have a perl script that can be run from a command prompt or from a VB
>>application. There is a command line switch (f) that determines whether
the
>>script is running from a command prompt or if it was called from the VB
>>script. If $opt_f  eq 2, then I direct the output of the script via
$socket
>>to the VB frontend. However, if the script is called from the command
>>prompt, I want the output displayed normally (in the command window). 
>>
>>Sending the output to the VB frontend works fine, but I can't figure out
how
>>to send the output to the command window if the script is called from a
>>command prompt. 
>>
>>if ($opt_f eq 2) {
>>  use IO::socket;
>>  $remote_host = "127.0.0.1";
>>  $remote_port = "1";
>>  $socket = IO::Socket::INET->new(PeerAddr => $remote_host,
>>  PeerPort => $remote_port,
>>  Proto=> "tcp",
>>  Type => SOCK_STREAM)
>>  or die "Couldn't connect to $remote_host:$remote_port :
>>[EMAIL PROTECTED]";
>>} else {
>>  $socket = ;
> 
>  open ( $socket, '>', ">STDOUT" ); # untested

I would think this would be easier :

$socket = \*STDOUT;

I'm assuming that whatever you are going to use $socket for can handle
a FH ref.  If not, then you could change the print below to something like :

if ($opt_f eq '2') {
print $socket ("Some Output\n");
} else {
print "Some Output\n";
}

where you print to a socket in one case or STDOUT in another.  A third
possiblity would be to use a sub to handle it - like my_print instead
of print and do the test there.

>>}
>>.
>>.
>>.
>>print $socket ("Some Output\n");


-- 
  ,-/-  __  _  _ $Bill LuebkertMailto:[EMAIL PROTECTED]
 (_/   /  )// //   DBE CollectiblesMailto:[EMAIL PROTECTED]
  / ) /--<  o // //  Castle of Medieval Myth & Magic
http://www.todbe.com/
-/-' /___/_<_http://dbecoll.tripod.com/ (My Perl/Lakers stuff)


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


Re: Win32 compilation problem

2004-11-15 Thread Sisyphus
Lyle Hopkins wrote:
And finally:-
perldll.rc:10:23: BuildInfo.h: No such file or directory
windres: gcc exited with status 1
dmake.exe:  Error code 1, while making '.\perldll.res'
Aaah ... yes - that's the error I was getting, too. I switched to using 
the 'makefile.mk' that shipped with build 809 source, and things then 
proceeded smoothly. Only problem was that one of the thread.t tests 
failed. See the thread 'AS perl 810 source and MinGW' on the ActiveState 
mailing list.

Like I said, if you can use perl5.8.5 source from cpan, then you should 
have no trouble at all.

If you really need it to be build 810 I could send you the makefile.mk I 
used.

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


Redirecting output (print) to

2004-11-15 Thread Leroy G. Blimegger Jr.
Hello All,

I have a perl script that can be run from a command prompt or from a VB
application. There is a command line switch (f) that determines whether the
script is running from a command prompt or if it was called from the VB
script. If $opt_f  eq 2, then I direct the output of the script via $socket
to the VB frontend. However, if the script is called from the command
prompt, I want the output displayed normally (in the command window). 

Sending the output to the VB frontend works fine, but I can't figure out how
to send the output to the command window if the script is called from a
command prompt. 

if ($opt_f eq 2) {
use IO::socket;
$remote_host = "127.0.0.1";
$remote_port = "1";
$socket = IO::Socket::INET->new(PeerAddr => $remote_host,
PeerPort => $remote_port,
Proto=> "tcp",
Type => SOCK_STREAM)
or die "Couldn't connect to $remote_host:$remote_port :
[EMAIL PROTECTED]";
} else {
$socket = ;
}
.
.
.
print $socket ("Some Output\n");


Regards,
Lee




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


RE: Win32 compilation problem

2004-11-15 Thread Lyle Hopkins
Sisyphus wrote:

>Last time I tried to build perl with dmake/MinGW using ActiveState
>source, I struck trouble - I think because they had altered
>'makefile.mk' to work with dmake and *Microsoft* compilers.
>
>The errors you're getting don't ring a bell with me, however.
>
>Just make sure that dmake is finding the correct makefile (makefile.mk).
>I usually rename the nmake 'makefile' to something like 'makefile.nmake'
>just to make sure that dmake doesn't go looking at it by mistake.
>
>You have the same MinGW as I've got - and the same dmake. If ActiveState
>source insists on being troublesome, try grabbing the perl 5.8.5 source
>from cpan and build that with dmake/MinGW. It worked flawlessly and
>effortlessly for me.


Your right, the version from CPAN went on straight away. And ActivePerl is
the most popular win32 port? Thought compiling their source would have been
easier.

Lyle

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


Re: Running v5.8.3 built for MSWin32-x86-multi-thread on Win98

2004-11-15 Thread Sisyphus
Margaret Chan wrote:
Hi,
Does anyone know if a perl script written in the above version would run 
in Windows 98? It does not seem to be, I suspect Win 98 can only 
accommodate 16-bit apps. Does anyone know for sure?

Shouldn't be any problem with that build of perl on Win98 - so long as 
the machine it's running on has a 32-bit architecture.

What sort of error messages are you getting ?
Cheers,
Rob
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Win32 compilation problem

2004-11-15 Thread Sisyphus
Lyle Hopkins wrote:
Hi All,
  I'm still having trouble compiling activeperl on win32. I'm starting to
loose hair over it now.
I tried an older version on nmake, but that made no difference. Looking at
the output VC8 was telling me some function calls were depreciated, so I
don't think it was working properly despite what it said.
So now I'm trying MinGW.
I downloaded the latest from:-
http://prdownloads.sf.net/mingw/MinGW-3.1.0-1.exe?download
And installed. I then grabbed the dmake suggested in the readme.win32 file:-
http://www.cpan.org/authors/id/GSAR/dmake-4.1pl1-win32.zip
Set up the PATH to use it and tried 'dmake'
Last time I tried to build perl with dmake/MinGW using ActiveState 
source, I struck trouble - I think because they had altered 
'makefile.mk' to work with dmake and *Microsoft* compilers.

The errors you're getting don't ring a bell with me, however.
Just make sure that dmake is finding the correct makefile (makefile.mk). 
I usually rename the nmake 'makefile' to something like 'makefile.nmake' 
just to make sure that dmake doesn't go looking at it by mistake.

You have the same MinGW as I've got - and the same dmake. If ActiveState 
source insists on being troublesome, try grabbing the perl 5.8.5 source 
from cpan and build that with dmake/MinGW. It worked flawlessly and 
effortlessly for me.

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


RE: Win32 compilation problem

2004-11-15 Thread Lyle Hopkins
What I'm getting for the new mingw and dmake is (only errors and warnings):-

gcc -c -I.\include -I. -I.. -I..\lib\CORE -DWIN32 -DHAVE_DES_FCRYPT -DPERLDL
L -
PERL_CORE -s -O2 -o.\mini\win32.o win32.c

lots of lines like that, then some warnings:-

win32.c: In function `win32_execv':
win32.c:4051: warning: passing arg 3 of `spawnv' from incompatible pointer
type
win32.c:4053: warning: passing arg 2 of `execv' from incompatible pointer
type
win32.c: In function `win32_execvp':
win32.c:4073: warning: passing arg 2 of `execvp' from incompatible pointer
type

Then a load more like the first with some:-

C:\Perl\SOURCE\AP810_source\warnings.h ->
C:\Perl\SOURCE\AP810_source\lib\CORE\warnings.h

Then some more warnings:-

In file included from perllib.c:34:
perlhost.h: In function `CPerlHost* IPerlMem2Host(IPerlMem*)':
perlhost.h:239: warning: invalid offsetof from non-POD type `class
CPerlHost';
   use pointer to member instead
perlhost.h: In function `CPerlHost* IPerlMemShared2Host(IPerlMem*)':
perlhost.h:244: warning: invalid offsetof from non-POD type `class
CPerlHost';
   use pointer to member instead
perlhost.h: In function `CPerlHost* IPerlMemParse2Host(IPerlMem*)':
perlhost.h:249: warning: invalid offsetof from non-POD type `class
CPerlHost';
   use pointer to member instead
perlhost.h: In function `CPerlHost* IPerlEnv2Host(IPerlEnv*)':
perlhost.h:254: warning: invalid offsetof from non-POD type `class
CPerlHost';
   use pointer to member instead
perlhost.h: In function `CPerlHost* IPerlStdIO2Host(IPerlStdIO*)':
perlhost.h:259: warning: invalid offsetof from non-POD type `class
CPerlHost';
   use pointer to member instead
perlhost.h: In function `CPerlHost* IPerlLIO2Host(IPerlLIO*)':
perlhost.h:264: warning: invalid offsetof from non-POD type `class
CPerlHost';
   use pointer to member instead
perlhost.h: In function `CPerlHost* IPerlDir2Host(IPerlDir*)':
perlhost.h:269: warning: invalid offsetof from non-POD type `class
CPerlHost';
   use pointer to member instead
perlhost.h: In function `CPerlHost* IPerlSock2Host(IPerlSock*)':
perlhost.h:274: warning: invalid offsetof from non-POD type `class
CPerlHost';
   use pointer to member instead
perlhost.h: In function `CPerlHost* IPerlProc2Host(IPerlProc*)':
perlhost.h:279: warning: invalid offsetof from non-POD type `class
CPerlHost';
   use pointer to member instead

Then:-

win32.c: In function `win32_execv':
win32.c:4051: warning: passing arg 3 of `spawnv' from incompatible pointer
type
win32.c:4053: warning: passing arg 2 of `execv' from incompatible pointer
type
win32.c: In function `win32_execvp':
win32.c:4073: warning: passing arg 2 of `execvp' from incompatible pointer
type

And finally:-

perldll.rc:10:23: BuildInfo.h: No such file or directory
windres: gcc exited with status 1
dmake.exe:  Error code 1, while making '.\perldll.res'

Why isn't it picking up BuildInfo.h? It's in the ../ folder.


What versions on MinGW and Dmake is everyone else using?


Lyle


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


RE: Win32 compilation problem

2004-11-15 Thread Lyle Hopkins
Hi All,
  I'm still having trouble compiling activeperl on win32. I'm starting to
loose hair over it now.

I tried an older version on nmake, but that made no difference. Looking at
the output VC8 was telling me some function calls were depreciated, so I
don't think it was working properly despite what it said.

So now I'm trying MinGW.

I downloaded the latest from:-
http://prdownloads.sf.net/mingw/MinGW-3.1.0-1.exe?download
And installed. I then grabbed the dmake suggested in the readme.win32 file:-
http://www.cpan.org/authors/id/GSAR/dmake-4.1pl1-win32.zip

Set up the PATH to use it and tried 'dmake'

It seemed to get quite far. There were a few warnings out data types but it
kept going. Then it stopped with
'Cannot find BuildInfo.h'
I checked and BuildInfo.h is in the source dir. So I copied it to the win32
subfolder, but then got an error 'perldll.i invalid string' or something
like that.

So I then downloaded the gcc2.95.2 as suggest in the readme.win32
http://downloads.ActiveState.com/pub/staff/gsar/gcc-2.95.2-msvcrt.zip

I reset the path and wipe and reunzipped the source files to get it all
fresh.

Then when I tried dmake it didn't get very far, giving me this:-

del /f config.h
copy config_H.gc config.h
1 file(s) copied.
gcc -c -I.\include -I. -I.. -I..\lib\CORE -DWIN32 -DHAVE_DES_FCRYPT -DPERLDL
L -DPERL_CORE -s -O2 -DPERL_EXTERNAL_GLOB -o.\mini\av.o ..\av.c
In file included from win32thread.h:4,
 from ..\perl.h:2056,
 from ..\av.c:22:
win32.h:314: warning: `struct _stati64' declared inside parameter list
win32.h:314: warning: its scope is only this definition or declaration,
which is
 probably not what you want.
In file included from win32.h:549,
 from win32thread.h:4,
 from ..\perl.h:2056,
 from ..\av.c:22:
win32iop.h:73: warning: `struct _stati64' declared inside parameter list
win32iop.h:74: warning: `struct _stati64' declared inside parameter list
win32iop.h:133: warning: `struct _stati64' declared inside parameter list
win32iop.h:133: conflicting types for `win32_stat'
win32iop.h:74: previous declaration of `win32_stat'
In file included from ..\perl.h:3479,
 from ..\av.c:22:
..\thrdvar.h:85: field `Tstatbuf' has incomplete type
..\thrdvar.h:86: field `Tstatcache' has incomplete type
dmake.exe:  Error code 1, while making '.\mini\av.o'


Now I'm going to go back to trying the older compiler as it got further. Any
help is very much appreciated. I need to get this going.




Lyle

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


Win32::AdminMisc::CreateProcessAsUser(.....) on Win Server 2003

2004-11-15 Thread Smith, Gregory
I'm testing out a new server running Windows Server 2003 / SE  that's going to 
replace our old Windows 2000 server.

Testing my existing Perl script included below.  The script will run however 
the application started looks like a ghost on the console desktop as only the 
frame appears.  Hopefully someone has some insight as to what's causing this 
and a solution as I am currently at a loss..


Here's my working script:

use Win32;
use Win32::Process;
use Win32::AdminMisc;
use Win32::API;


logit("Script Started");

$exeFile = "C:\\windows\\notepad.exe";

$domain = 'YourDomain';
$value1 = 'YourId';
$value2 = 'YourPassword';

if(Win32::AdminMisc::LogonAsUser($domain, $value1, $value2, 
LOGON32_LOGON_INTERACTIVE ))
{
$name = Win32::AdminMisc::GetLogonName();

if ( "\L$value1" ne "\L$name")
{
logit("  The Login Failed\n domain: $domain   user: $value1   Whos 
logged in: $name", "-d");
}
else
{
logit("  $domain$value1 Logged in..");
}
}
else
{
logit("  The Login Failed For user: $value1", "-d");
}


#Create the process object.
if(Win32::AdminMisc::CreateProcessAsUser($exeFile))
{
logit("  Started: $exeFile");
}
else
{
logit("  Failed to Start $exeFile ", "-d");
}


Win32::AdminMisc::LogoffAsUser();

exit;



sub logit
{
open(log_out,">>script.Log") or die "Can't write to log: $! \n";

$str = (1900+(localtime)[5])."/".sprintf("%02d",(1+(localtime)[4]))."/".
   sprintf("%02d",(localtime)[3])." ".sprintf("%02d",(localtime)[2]).
   
":".sprintf("%02d",(localtime)[1]).":".sprintf("%02d",(localtime)[0])."  ";

print log_out $str, $_[0], "\n";

close(log_out);

}


 
Thanks in Advance!

Gregory P. Smith
Pioneer, A DuPont Company
E-Mail: No SPAM:[EMAIL PROTECTED] 
Phone: 515-253-2468




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


Running v5.8.3 built for MSWin32-x86-multi-thread on Win98

2004-11-15 Thread Margaret Chan

Hi,

Does anyone know if a perl script written in the above version would run in Windows 98? It does not seem to be, I suspect Win 98 can only accommodate 16-bit apps. Does anyone know for sure?

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


Re: Fwd: mkdir questions on unix platform

2004-11-15 Thread Johan Lindstrom
At 16:15 2004-11-15, Ella Cai wrote:
Let me make question clear, in fact my question is how can i create 
directories recursively.
mkpath
http://search.cpan.org/~nwclark/perl-5.8.5/lib/File/Path.pm
/J
 --  --- -- --  --  - - --  -
Johan LindströmSourcerer @ Boss Casinos   johanl AT DarSerMan.com
Latest bookmark: "TCP Connection Passing"
http://tcpcp.sourceforge.net/
dmoz: /Computers/Programming/Languages/JavaScript/ 12
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: mkdir questions on unix platform

2004-11-15 Thread Anderson, Mark (Service Delivery)
mkdir -p /path/to/some/new/directory on unix will create the entire path if
you have the rights to do so.

use File::Path;
mkpath('/path/to/some/directory/or/other',0,0755);

perldoc File::Path;
perldoc umask
man umask
man mkdir

Kind regards,

Mark Anderson
Service Improvement Project
Level 2, 113 Dundas Street
Edinburgh, EH3 5DE
Tel: 0131 523 8786
Mob: 07808 826 063


> -Original Message-
> From: Ella Cai [SMTP:[EMAIL PROTECTED]
> Sent: Monday, November 15, 2004 3:15 PM
> To:   [EMAIL PROTECTED]
> Cc:   [EMAIL PROTECTED]
> Subject:  Fwd: mkdir questions on unix platform
> 
> *** WARNING : This message originates from the Internet ***
> 
> 
> Let me make question clear, in fact my question is how can i create
> directories recursively.
>  
> Do you have any example?
>  
> Thanks
>  
> Lixin
> 
> Note: forwarded message attached.
> 
>   _  
> 
> Do you Yahoo!?
> Check out the new Yahoo! Front Page. www.yahoo.com 
> << Message: mkdir questions on unix platform >>  << File: ATT3372979.txt
> >> 


The Royal Bank of Scotland plc, Registered in Scotland No. 90312. Registered 
Office: 36 St Andrew Square, Edinburgh EH2 2YB

The Royal Bank of Scotland plc is authorised and regulated by the Financial 
Services Authority and represents The Royal Bank of Scotland Marketing Group. 
The Bank sells life policies, collective investment schemes and pension 
products and advises only on the Marketing Group's range of these products and 
on a With-Profit Bond produced by Norwich Union Life (RBS) Limited.

This e-mail message is confidential and for use by the addressee only. If the 
message is received by anyone other than the addressee, please return the 
message to the sender by replying to it and then delete the message from your 
computer. Internet e-mails are not necessarily secure. The Royal Bank of 
Scotland plc does not accept responsibility for changes made to this message 
after it was sent.

Whilst all reasonable care has been taken to avoid the transmission of viruses, 
it is the responsibility of the recipient to ensure that the onward 
transmission, opening or use of this message and any attachments will not 
adversely affect its systems or data. No responsibility is accepted by The 
Royal Bank of Scotland plc in this regard and the recipient should carry out 
such virus and other checks as it considers appropriate.

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


Fwd: mkdir questions on unix platform

2004-11-15 Thread Ella Cai
Let me make question clear, in fact my question is how can i create directories recursively.
 
Do you have any example?
 
Thanks
 
LixinNote: forwarded message attached.
	
		Do you Yahoo!? 
Check out the new Yahoo! Front Page. www.yahoo.com--- Begin Message ---
My codes is like this:
**
my $new_data_dir = "/var/tmp/sct_1.61/data";
mkdir ($new_data_dir, 0744) unless (-d $new_data_dir);
**
 
/var/tmp exists, but /sct_1.61/data does not exist under /var/tmp. It looks like mkdir function does not work well. It does not create /sct_1.61/data. Could you please let me know why? and how to solve it?
 
Thanks
 
Lixin
 __Do You Yahoo!?Tired of spam?  Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--- End Message ---
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: mkdir questions on unix platform

2004-11-15 Thread Anderson, Mark (Service Delivery)
Try using 
use File::Path; #see the docs

mkpath will emulate a unix mkdir -p  

Kind regards,

Mark Anderson
Service Improvement Project
Level 2, 113 Dundas Street
Edinburgh, EH3 5DE
Tel: 0131 523 8786
Mob: 07808 826 063


> -Original Message-
> From: Ella Cai [SMTP:[EMAIL PROTECTED]
> Sent: Monday, November 15, 2004 2:22 PM
> To:   [EMAIL PROTECTED]
> Cc:   [EMAIL PROTECTED]
> Subject:  mkdir questions on unix platform
> 
> *** WARNING : This message originates from the Internet ***
> 
> 
> My codes is like this:
> **
> my $new_data_dir = "/var/tmp/sct_1.61/data";
> mkdir ($new_data_dir, 0744) unless (-d $new_data_dir);
> **
>  
> /var/tmp exists, but /sct_1.61/data does not exist under /var/tmp. It
> looks like mkdir function does not work well. It does not create
> /sct_1.61/data. Could you please let me know why? and how to solve it?
>  
> Thanks
>  
> Lixin
>  
> 
> __
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com  << File: ATT2352909.txt >> 


The Royal Bank of Scotland plc, Registered in Scotland No. 90312. Registered 
Office: 36 St Andrew Square, Edinburgh EH2 2YB

The Royal Bank of Scotland plc is authorised and regulated by the Financial 
Services Authority and represents The Royal Bank of Scotland Marketing Group. 
The Bank sells life policies, collective investment schemes and pension 
products and advises only on the Marketing Group's range of these products and 
on a With-Profit Bond produced by Norwich Union Life (RBS) Limited.

This e-mail message is confidential and for use by the addressee only. If the 
message is received by anyone other than the addressee, please return the 
message to the sender by replying to it and then delete the message from your 
computer. Internet e-mails are not necessarily secure. The Royal Bank of 
Scotland plc does not accept responsibility for changes made to this message 
after it was sent.

Whilst all reasonable care has been taken to avoid the transmission of viruses, 
it is the responsibility of the recipient to ensure that the onward 
transmission, opening or use of this message and any attachments will not 
adversely affect its systems or data. No responsibility is accepted by The 
Royal Bank of Scotland plc in this regard and the recipient should carry out 
such virus and other checks as it considers appropriate.

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


mkdir questions on unix platform

2004-11-15 Thread Ella Cai
My codes is like this:
**
my $new_data_dir = "/var/tmp/sct_1.61/data";
mkdir ($new_data_dir, 0744) unless (-d $new_data_dir);
**
 
/var/tmp exists, but /sct_1.61/data does not exist under /var/tmp. It looks like mkdir function does not work well. It does not create /sct_1.61/data. Could you please let me know why? and how to solve it?
 
Thanks
 
Lixin
 __Do You Yahoo!?Tired of spam?  Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Going back to earlier perl.

2004-11-15 Thread Sisyphus
Beckett Richard-qswi266 wrote:
Guys,
I'm having too many problems with activeperl 5.8.4 build 810, so I've decided 
to go back to 5.8.1 build 807.
I don't doubt that you are confronted with problems with build 810 - but 
are you sure that reverting to build 807 is going to fix those problems ?

I can't see that it's going to change much - you'll get a different perl 
executable and dll - but most of the modules that ship with AS perl will 
remain unchanged (one expects that any differences that exist will be 
for the worse), and any additional modules that *you* have installed via 
ppm will be unchanged.

If you proceed with your plan, and it *does* fix your problems, then you 
probably should inform ActiveState. (In that event, assuming that 
they're perl problems, as opposed to, say, PDK problems, I'd also be 
interested to hear of them.)

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


Going back to earlier perl.

2004-11-15 Thread Beckett Richard-qswi266
Guys,

I'm having too many problems with activeperl 5.8.4 build 810, so I've decided 
to go back to 5.8.1 build 807.

As long as I make a note of the modules that I've personalised, is there 
anything else I need to save before blowing 5.8.4 away?

Thanks.

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