Re: Finding IP address connected to your http server.

2003-01-17 Thread Gary Stainburn
On Friday 17 Jan 2003 7:18 am, simran wrote: > if (you are looking for connections that have come in over time) then > look in the log file > else if i you are looking for the ip that is current connecting to the cgi > script you can usually find that info in the environment variable > REMOTE

Re: ppm: No suitable installation target for package G

2003-01-17 Thread David Eason
It installs now, thanks so much for your help! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: [CiRT] Finding IP address connected to your http server.

2003-01-17 Thread Jonathan Gill
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Are you looking for someway to process the log files from the web server or do you want to see what is _directly_ connected at the time? If you are looking for ways to process logs, then check the perl cookbook (oreilly) that has some examples in th

doubt in mysql

2003-01-17 Thread kasi ramanathen
i'm to update a pearl programme using mysql, i know only less of the latter. i come across a statement $ver=$dbh->prepare(SELECT jobid, pid from jobs where exectime

Re: Finding IP address connected to your http server.

2003-01-17 Thread Victor Tsang
Maybe we should bring this discussion out to a more appropiate list, but anyways, have a look into this doc. http://dev.zope.org/Wikis/DevSite/Proposals/RemoteAddrAndAccelerators This is not perfertly reliable, but you might want to consider it. Tor. > > Please bear in mind that this IP addr

Re: determining location of character in array....

2003-01-17 Thread Rob Dixon
Mike Liss wrote: > Hello, > > Is there an easy way to get the location of a specific instance of a > character > in an array? > > for example: > > $MyArray = "This is the test"; > > I would like to know the index of the first occurence of the letter > "h" ( 1 ) Hi Mike I thought you may be in

[perl #20364] How to use com components in perl

2003-01-17 Thread Pankaj Kapare
Sir, I want know how to use com components developed in c++ within perl script. Thanking you! pankaj.

Length of String

2003-01-17 Thread Ho, Tony
Hi guys Do you know whether there is a function in perl to find the size of a string ? For example, "06" would be size 2. Cheers Tony

RE: Length of String

2003-01-17 Thread NYIMI Jose (BMB)
C:\>perl -e "print length('06')"; 2 C:\> See perldoc -f length José. > -Original Message- > From: HO Tony (CSG) > Sent: Friday, January 17, 2003 12:08 PM > To: '[EMAIL PROTECTED]' > Subject: Length of String > > > Hi guys > Do you know whether there is a function in perl to find the

RE: [perl #20364] How to use com components in perl

2003-01-17 Thread Beau E. Cox
Hi - > -Original Message- > From: Pankaj Kapare [mailto:[EMAIL PROTECTED]] > Sent: Friday, January 17, 2003 1:04 PM > To: [EMAIL PROTECTED] > Subject: [perl #20364] How to use com components in perl > > > Sir, > I want know how to use com components developed in c++ within > perl scri

RE: Perl book

2003-01-17 Thread Dylan Boudreau
Thanks to everyone for all their advice on what book to go with next. I think I am going to go with the Perl Black Book for now but I am sure I will eventually buy Perl Cookbook and Programming Perl. I can't really wait a couple of months because I hate my job and the learning of Perl is key to g

Re: doubt in mysql

2003-01-17 Thread Jenda Krynicky
From: kasi ramanathen <[EMAIL PROTECTED]> > i'm to update a pearl programme using mysql, i know only less of the > latter. i come across a statement > > $ver=$dbh->prepare(SELECT jobid, pid from jobs where exectime > now i want to know the perpose of " statement The < is just a less than. Nothi

help in lwp

2003-01-17 Thread kasi ramanathen
use LWP::Simple; getprint("http://www.yahoo.com/";); this code will print the whole yahoo page as html output in your system. but instud of using simple i want to use UserAgent. shall you give me the code so that i can cut and past and run the program. please response quickly Catch all the cri

Re: Script that runs on my Win98 box and the Unix server

2003-01-17 Thread Rob Richardson
Joe, Maybe this is a difference between ActivePerl and IndigoPerl. I'm using Indigo, although I also have ActivePerl on my machine. But I created a folder named c:\usr\bin and copied perl.exe into it, and it's working. RobR --- "R. Joseph Newton" <[EMAIL PROTECTED]> wrote: > "...Is there any

RE: help:how to hex2bin,bin2hex,bin2dec,dec2bin

2003-01-17 Thread murphy, daniel (BMC Eng)
I remember seeing this awhile ago on this list and saved it: bin2dec: $out = unpack("N", pack("B32", substr("0" x 32 . $in, -32))); bin2hex: $out = unpack("H8", pack("B32", substr("0" x 32 . $in, -32))); bin2oct: $out = sprintf "%o", unpack("N", pack("B32", substr("0" x 32 . $i

write to file

2003-01-17 Thread Thomas Browner
How do I use perl to write to a file? Thomas

Re: baffling script behavior- root loses files

2003-01-17 Thread zentara
On Thu, 16 Jan 2003 22:34:53 +0100, [EMAIL PROTECTED] (Jenda Krynicky) wrote: >> are missing, seemingly random: > >Ahh the usual mistake. > >The readdir() returns just the file and subdirectory names, not >complete paths. > >Therefore if you opendir() some other directory than '.' you have to >p

Re: Length of String

2003-01-17 Thread Bill Akins
perldoc -f length #!/usr/local/bin/perl -w use strict; my $foo = "This is 10"; my $i = (length $foo); print "The string is $i charecters long!\n"; >>> "Ho, Tony" <[EMAIL PROTECTED]> 01/17/03 06:08AM >>> Hi guys Do you know whether there is a function in perl to find the size of a string ? For ex

RE: write to file

2003-01-17 Thread Dylan Boudreau
open FILEHANDLE, "> output.txt" or die "$!"; print FILEHANDLE "Some text\n"; print FILEHANDLE "Some more text\n"; close FILEHANDLE; Dylan -Original Message- From: Thomas Browner [mailto:[EMAIL PROTECTED]] Sent: January 17, 2003 10:22 AM To: [EMAIL PROTECTED] Subject: write to file Ho

Re: help in lwp(I GOT ANSWER)

2003-01-17 Thread kasi ramanathen
i was waiting for answer but nune came i myself found solution. if it is useful to someone just cut and paste this programe and see the output use LWP::UserAgent; $ua=LWP::UserAgent->new; #$ua->agent("Mozilla/3.0"); $req=new HTTP::Request(GET=>"http://www.yahoo.com";); $res=$ua->request($req); p

passing arguments to a subroutine to try and match two fields in a text file

2003-01-17 Thread Le Blanc, Kerry (Kerry)
I think I am getting close. With much help I have been able to tweek my original code down quite a bit. For the most part, everything is working as it should. What is stumping me right now is, how do I make sure that both the part number and the rev match before printing out the record. The part

Re:perl confusion/ and passwd

2003-01-17 Thread RF
> 2) Since 5.6.1 is installed right now, can I install > 5.8.0 over it without uninstalling 5.6.1? (Btw, > I'm running Slackware Linux 8.0). You may want to look at the latest issue of the Perl Journal (www.tpj.com). It has an excellent article by Matthew O. Persico entitled: Juggling Perl Versio

RE: passing arguments to a subroutine to try and match two fields in a text file

2003-01-17 Thread wiggins
See inline. On Fri, 17 Jan 2003 11:01:58 -0500, "Le Blanc, Kerry (Kerry)" <[EMAIL PROTECTED]> wrote: > I think I am getting close. With much help I have been able to tweek my original >code down quite a bit. For the most part, everything is worki

using if(0) statements

2003-01-17 Thread Johnson, Shaunn
Howdy: I am not familiar with using 'if' in a script and I have come across a list of new scripts that I now have to learn / maintain. In most of the scripts, there are things that begins with if (0). Say, for example: --[code] if (0) { $path="$dest/new_local"; makepath ($path); &first(1); }

Re: using if(0) statements

2003-01-17 Thread Jenda Krynicky
From: "Johnson, Shaunn" <[EMAIL PROTECTED]> > I am not familiar with using 'if' in a script and I have > come across a list of new scripts that I now > have to learn / maintain. In most of the scripts, > there are things that begins with if (0). > > Say, for example: > > --[code] > > if (0) { >

Re: using if(0) statements

2003-01-17 Thread Ben Siders
Since it's commented out, it could be that somebody removed that function in previous maintenance. Jenda Krynicky wrote: From: "Johnson, Shaunn" <[EMAIL PROTECTED]> I am not familiar with using 'if' in a script and I have come across a list of new scripts that I now have to learn / maintain.

Re: passing arguments to a subroutine to try and match two fields in a text file

2003-01-17 Thread Rob Dixon
[EMAIL PROTECTED] wrote: >> open (FH, './fai.txt') || die "Cannot open file: ($!)"; >> my @parts = ; >> my @rev = ; > > This stores two copies of the file in memory, do you need two copies? > It doesn't actually. The first assignment leaves you at end-of-file so subsequent reads fail. @parts wi

RE: passing arguments to a subroutine to try and match two fields in a text file

2003-01-17 Thread Le Blanc, Kerry (Kerry)
I made some changes. Now I get an error message. The message says "Can't use string ("") as an ARRAY ref while "strict refs" in use" Here is the code as it stands now, with changes. #!/usr/bin/perl -w use strict; use Data::Dumper; use diagnostics -verbose; print "Enter the Part Number you w

Re: passing arguments to a subroutine to try and match two fields in a text file

2003-01-17 Thread Rob Dixon
Le Blanc wrote: > I made some changes. Now I get an error message. > > The message says "Can't use string ("") as an ARRAY ref while "strict > refs" in use" > > Here is the code as it stands now, with changes. > > #!/usr/bin/perl -w > use strict; > use Data::Dumper; > use diagnostics -verbose; > >

Telnet using IO:Socket module

2003-01-17 Thread pankajwarade
Hi, I am tring to use IO::Socket module in order to execute the commands on remote server. Perl script connects remote server on port 23, and waits for login prompt forever. It recieves non-printable characters instead of login prompt. - #!/usr/bin/perl use IO::Socket; my $sock = ne

Re: baffling script behavior- root loses files

2003-01-17 Thread David T-G
zentara -- ...and then zentara said... % ... % I guess I was thrown off by the fact that I did get some output, but % not the full output. I guess this is one of those areas where Perl % will do something unpredictable? It depends on what you expect perl to do ;-) It wasn't unpredictable for *s

Re: Telnet using IO:Socket module

2003-01-17 Thread david
Pankajwarade wrote: > my $sock = new IO::Socket::INET ( > Proto => 'tcp', > PeerAddr=> 10.38.3.3, > PeerPort=> 23, > ) or > > die "

Multiple aliases for same sub

2003-01-17 Thread Oblak, Sasha
Hello I defined on sub (say 'foo'), and I have defined 2 alias that point to foo (say 'boo' and 'zoo'). When I call the either function boo or zoo, I really enter foo. Is there any way to find out which sub was really called either 'boo' or 'zoo'? I tried using caller, but caller returns foo.

Re: Telnet using IO:Socket module

2003-01-17 Thread kevin reynolds
The argument 'tcp' is the correct use. Telnet is implemented over the tcp protocol. The proto field is looking for tcp, udp etc. I believe the problem may be at the beginning of the script. Try use IO::Socket::INET; (you may have to get it from cpan) instead of use IO::Socket;. That might

Test

2003-01-17 Thread lielie meimei
__ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

a small script in which a dbm hash fails to work right

2003-01-17 Thread willy
i have a vexing problem for you the following does work fine::: #dbmopen(%CARDREC, "testbase22", 0664)|| #die "can't dbmopen testbase with mode 0664"; open (IN, "test.in")|| die "can't open test.in"; $index=0; foreach (){ $index++; ($index=1) if ($index>10); chomp();

Re: a small script in which a dbm hash fails to work right

2003-01-17 Thread John W. Krahn
Willy wrote: > > i have a vexing problem for you > the following does work fine::: > > [snip] > > the output is as follows:: > > line one > > line one line two line three line four line five line sixe line seven line > 8 line 9 > > l11 > >