how to find current dir..

2002-02-05 Thread brianr
Abhimanyu_Bhola writes: > I have this requirement ( for both Linux/Windows): > > use File::Copy; > File::Copy::copy ( , ) > > > How can I find the current dir(in which this script is running)? For your requirement you don't need to know what the current directory is. If the fi

RE: how to find current dir..

2002-02-05 Thread Arms, Mike
So wrong. $0 is the name of the currently executing program. What you want is: use Cwd; $dir = cwd; -- Mike Arms -Original Message- From: Swartwood, Larry H [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 10:06 AM To: 'Abhimanyu_Bhola'; [EMAIL PROTECTED] Subject: RE: h

RE: how to find current dir..

2002-02-05 Thread Swartwood, Larry H
$working_dir = $0; -Original Message- From: Abhimanyu_Bhola [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 8:53 AM To: [EMAIL PROTECTED] Subject: how to find current dir.. I have this requirement ( for both Linux/Windows): use File::Copy; File::Copy::copy (

how to find current dir..

2002-02-05 Thread Abhimanyu_Bhola
I have this requirement ( for both Linux/Windows): use File::Copy; File::Copy::copy ( , ) How can I find the current dir(in which this script is running)? thanks Abhi ** This email (including any attachme

crashing when using a dbm file

2002-02-05 Thread brianr
Michael T Godfrey writes: > I have a perl program that crashes when i run it with activeperl. But it > runs fine when i run it on unix. > > > #!/usr/bin/perl > > $file = "test"; > > dbmopen (%HASH, "$file",0444); > > $HASH{a} = "1"; > $HASH{b} = "2"; > $HASH{c} = "3"; > > @k

HTTP Request error

2002-02-05 Thread brianr
Bill Stennett writes: > Hi All > > Platform: windows, AS Perl > > I'm trying to create a request object to post data to a web URL. My problem > is that I can't get past creating the request object. I need to pass a > couple of values (a and b). The offending line of code is shown below:

Re: Getting the process id

2002-02-05 Thread Vassiliy Truskov
Philip, $$ gives you a PID of your perl process.. use Win32::PerfLib gives you PID of all processes on NT Vassiliy Philip Morley wrote: > Hi, > > How do you get the process id (PID) of a process running on NT using Perl? > > Thanks, > > Phil Morley. > > ___

HTTP Request error

2002-02-05 Thread Bill Stennett
Hi All Platform: windows, AS Perl I'm trying to create a request object to post data to a web URL. My problem is that I can't get past creating the request object. I need to pass a couple of values (a and b). The offending line of code is shown below: $request = new HTTP::Request('POST',"http

crashing when using a dbm file

2002-02-05 Thread Michael T Godfrey
I have a perl program that crashes when i run it with activeperl. But it runs fine when i run it on unix. #!/usr/bin/perl $file = "test"; dbmopen (%HASH, "$file",0444); $HASH{a} = "1"; $HASH{b} = "2"; $HASH{c} = "3"; @k = keys (%HASH); foreach $var (@k) { print "$var\n"; }; ## END

RE: NT service can't run script

2002-02-05 Thread Steven Wadding
At 09:41 AM 2/5/02 -0500, [EMAIL PROTECTED] wrote: >Steve, >Just a quick question on NT service. Do you find it easier (and faster) >if >ActivePerl is setup as a service versus a standard .exe? I have always >wondered which one operates more efficiently, more stable and faster? I haven't reall

RE: NT service can't run script

2002-02-05 Thread ALincoln
Steve, Just a quick question on NT service. Do you find it easier (and faster) if ActivePerl is setup as a service versus a standard .exe? I have always wondered which one operates more efficiently, more stable and faster? thx in advance, Adym Lincoln Edgewater Technology, Inc. Phone: (603) 6

Re: NT service can't run script

2002-02-05 Thread Steven Wadding
At 03:29 AM 2/1/02 +, Serge Dergham wrote: >Script run fine from command promp, But not when called by an NT service. >This is not a script problem, perl itself is not running. >Tried to change account used by the service, tried system, administrator, >... >nothing helped >Would appreciate an

Getting the process id

2002-02-05 Thread Philip Morley
Hi, How do you get the process id (PID) of a process running on NT using Perl? Thanks, Phil Morley. ___ ActivePerl mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/listinfo/activeperl

RE: IP of local machine???

2002-02-05 Thread Abhimanyu_Bhola
Thanks a lot. am using the 'gethostbyname() method. works fine for me, too. -Abhi -Original Message- From: $Bill Luebkert [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 1:07 PM To: Abhimanyu_Bhola Cc: active Subject: Re: IP of local machine??? Abhimanyu_Bhola wrote: > Ho

How to test if there's a connection to internet?

2002-02-05 Thread Alex Shi
In Perl, how to test if there is a connection to internet? alex Shi ___ ActivePerl mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/listinfo/activeperl

Re: How to simulate http access?

2002-02-05 Thread Edward G. Orton
- Original Message - From: "Alex Shi" <[EMAIL PROTECTED]> To: "active" <[EMAIL PROTECTED]> Sent: Tuesday, February 05, 2002 3:43 AM Subject: How to simulate http access? > In perl how can access a remote document via 80(http) port? > I know in php there's a very simple way to do this: >

How to simulate http access?

2002-02-05 Thread Alex Shi
In perl how can access a remote document via 80(http) port? I know in php there's a very simple way to do this: $rfp = fopen( http://www.blabla.com, 'r' ); I am just wondering if there's something as simple as the above in perl. Alex Shi ___ Acti