Compiling CPAN modules with VS.net

2004-10-31 Thread Octavian Rasnita
Hi all, Some modules downloaded from CPAN need to be compiled in order to be installed and I know that I can use Visual Studio 6 (under Windows) for this task. Do you know if I will be able to compile those modules after I will install Visual Studio .net (7)? Or, if this is not possible, do you k

DN <-> IP

2004-10-31 Thread Ing. Branislav Gerzo
Hi all, I just wrote small script to resolve domain name on basis IP address and vice versa, do you think it is the best and fastest way? Thanks. use strict; use warnings; use Socket; my ($host, $ip); $host = 'www.google.com'; $ip = inet_ntoa(inet_aton($host)) || 'no IP'; print "$host: $ip\n";

Sending a compressed html

2004-10-31 Thread Octavian Rasnita
Hi, Please tell me how can I compress the html with gzip and send it to the clients' browsers in order to be transfered faster. Thanks. Teddy -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: substr

2004-10-31 Thread Robert Citek
On Saturday, Oct 30, 2004, at 21:46 US/Central, [EMAIL PROTECTED] wrote: My earlier post was not quite clear. I will explain my problem in detail here. I have a string whose length is say 5. I need to copy another string into this string but from an offset of 10. I tried using substr but this is a

Re: Strange Error

2004-10-31 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Mike Blezien) writes: >Gunnar Hjalmarsson wrote: >> Mike Blezien wrote: >> >>> What does this type of error indicate, I never encountered this type >>> of error before. >>> >>> Modification of a read-only value attempted at >>> /home/www/cgi/som

Re: how to add Control G in the message

2004-10-31 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Sreedhar Kalkunte-Venkatachala) writes: >Hi > >I am printing the message using print statement. print "the message is = >$msg"; > >How to add control G in that. I assume that what you want to do is ring the bell. In which case, if you type

Re: Get all mail addresses from a domain

2004-10-31 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Eva Perales Laguna) writes: >Hello, > >I use the Net::SMTP module to check if a mail address is present >in a domain. [snip] >But I would like to get all the addresses in that domain. The only people who can tell you that are the administrators

RE: DN <-> IP

2004-10-31 Thread Jim
> I just wrote small script to resolve domain name on basis IP address and vice versa, do you think it is the best and fastest way? Thanks. > my ($host, $ip); > > $host = 'www.google.com'; > $ip = inet_ntoa(inet_aton($host)) || 'no IP'; print "$host: $ip\n"; > > $ip = '213.160.174.5'; > $host = g

Re: using 'my' problem

2004-10-31 Thread Zeus Odin
The reason why you don't get the uninitialized warning in the 2nd and 3rd examples below is that your print is within the for loop. Since both @files and keys %files contain nothing, the innards of the for loop NEVER get executed. Therefore, the print is not attempted at all for examples 2 and 3.

Re: pattern matching

2004-10-31 Thread Robert Citek
On Saturday, Oct 30, 2004, at 20:52 US/Central, John W. Krahn wrote: [EMAIL PROTECTED] wrote: I have to match patterns of the format string1>string2 where the strings 1 & 2 can contain alphabets,numbers and spaces. The string are separated by '>' sign. I wrote the following code for this. if(/([a-z

Re: pattern matching

2004-10-31 Thread mk76
I used this solution if(/([a-z0-9\t ]*)>([a-z0-9\t ]*)/gi) { $string1 = $1; $string2 = $2; } Quoting Robert Citek <[EMAIL PROTECTED]>: > > On Saturday, Oct 30, 2004, at 20:52 US/Central, John W. Krahn wrote: > > [EMAIL PROTECTED] wrote: > >> I have to match patterns of the format > >>

Re: pattern matching

2004-10-31 Thread Gunnar Hjalmarsson
[EMAIL PROTECTED] wrote: I used this solution if(/([a-z0-9\t ]*)>([a-z0-9\t ]*)/gi) { $string1 = $1; $string2 = $2; } That was the one I suggested. It may or may not be a decent solution for what you are doing; I for one can't tell without knowing more. One detail: The /g modifier is pr

Re: each character in a string

2004-10-31 Thread Jenda Krynicky
From: "John W. Krahn" <[EMAIL PROTECTED]> > [EMAIL PROTECTED] wrote: > > I have to write a code wherein I have to access each character in a > > string and compare it with '-' > > > > $_ = $seq1[0]; > > while(/./g) { > > if($1 eq '-') { > > $res1[0] .= '-'; > ^^ > > > } > >

Re: Compiling CPAN modules with VS.net

2004-10-31 Thread Jenda Krynicky
From: "Octavian Rasnita" <[EMAIL PROTECTED]> > Some modules downloaded from CPAN need to be compiled in order to be > installed and I know that I can use Visual Studio 6 (under Windows) > for this task. Do you know if I will be able to compile those modules > after I will install Visual Studio .net

RE: Append on top

2004-10-31 Thread Jenda Krynicky
From: Ajey Kulkarni <[EMAIL PROTECTED]> > >>> while (read OLDFILE, $buff, 8*1024); > > A quick qn. :) Y is 8*1024 being mentioned here? Are you just > word-aligning or something else? Something like that. 1024 is one K. So 8*1024 is 8KB. I don't know what the size of a block is when reading from

Re: Interpreting Benchmark test

2004-10-31 Thread Jenda Krynicky
From: Owen <[EMAIL PROTECTED]> > My first foray into Benchmark with the code below produced these > results; > > The file is 22000 lines, and there are 2 matches in the file. > > [EMAIL PROTECTED] PerlScripts]$ perl benchmark.pl > > Regex with modifer > YES > YES > timethis 100: 5 wallcloc

RE: Newbie: Perl Vs Shell

2004-10-31 Thread Jenda Krynicky
From: Chris Devers <[EMAIL PROTECTED]> > On Fri, 29 Oct 2004, Jenda Krynicky wrote: > > > Actually no. They are generaly not very fast. The reason is that the > > shell interpreter needs to create a new process for each and every > > commend you specify in the script [...] > > Is this true even f

Re: pattern matching

2004-10-31 Thread Don VanSyckel
The original regex matched on lower case then uper case then digits then white space then the separator then lower case then uper case then digits then white space This is not what you wanted. If '>' is the separator then you should match on: anything other than the separator

Re: pattern matching

2004-10-31 Thread John W. Krahn
Robert Citek wrote: On Saturday, Oct 30, 2004, at 20:52 US/Central, John W. Krahn wrote: [EMAIL PROTECTED] wrote: I have to match patterns of the format string1>string2 where the strings 1 & 2 can contain alphabets,numbers and spaces. The string are separated by '>' sign. I wrote the following code

Re: each character in a string

2004-10-31 Thread John W. Krahn
Jenda Krynicky wrote: From: "John W. Krahn" <[EMAIL PROTECTED]> [EMAIL PROTECTED] wrote: I have to write a code wherein I have to access each character in a string and compare it with '-' $_ = $seq1[0]; while(/./g) { if($1 eq '-') { $res1[0] .= '-'; ^^ } else { $res1[0] = "A";

Re: Why is not "sub" necessary? What is the difference: block and expression?

2004-10-31 Thread David le Blanc
On Fri, 29 Oct 2004 10:29:21 -0600, Siegfried Heintze <[EMAIL PROTECTED]> wrote: > I'm trying to understand the map function in perl and have been studying > David's response to my earlier query. > > When David calls his iterate function, why does he not need to use the > keyword "sub"? Apparently