Re: Query an IP from file

2007-05-23 Thread Jeff Pang
Thomas Bätzler 写道: Hi, Jeff Pang <[EMAIL PROTECTED]> asked: I have a text file which contains lots of IPs,like: 58.253.0.0/16; 58.254.0.0/16; 58.255.0.0/16; 60.0.0.0/16; 60.1.0.0/16; 60.10.0.0/16; 60.16.0.0/16; 60.17.0.0/16; 60.18.0.0/16; 60.19.0.0/16; 60.2.0.0/16; 60.20.0.0/16; 60.21.0.0/16

Re: Query an IP from file

2007-05-23 Thread Dr.Ruud
Jeff Pang schreef: > I have a text file which contains lots of IPs,like: > 58.253.0.0/16; > : > 60.3.0.0/16; Is it always /16? Can they overlap? > My question is,[ ]given an IP,[ ]ie 59.32.232.33,[ ]how > can I know it exists in this file or not? exists? ITYM: matches (they are masks) You cou

How to split a large string with repeating delimiters into multiple substrings

2007-05-23 Thread Michael Goopta
Hi All, I am new to Perl. How can I split the below string and get the multiple web-addresses in a list: (i.e. the strings between and http://view-preprod.admission.net/abc/mactive/_NJMG_0002029003-01/i-1.JPG?t=tr/m:FitPad/w:199/h:124&t=ts/r:199x199http://view-preprod.admission.net/abc/mactive

Re: Query an IP from file

2007-05-23 Thread Mumia W.
On 05/23/2007 03:01 AM, Jeff Pang wrote: Hello Thomas, I tried your codes,it's good I think. I've modified some of the codes to fit my situation. But if the network data files include too much IPs,my program used up all memory and couldn't get continued. Below are my modified codes.Attachmen

Re: How to split a large string with repeating delimiters into multiple substrings

2007-05-23 Thread Rob Dixon
Michael Goopta wrote: I am new to Perl. How can I split the below string and get the multiple web-addresses in a list: (i.e. the strings between and http://view-preprod.admission.net/abc/mactive/_NJMG_0002029003-01/i-1.JPG?t=tr/m:FitPad/w:199/h:124&t=ts/r:199x199http://view-preprod.admission

Crypt::GCrypt error on new method

2007-05-23 Thread JOHN FISHER
I am attempting to use gcrypt using a Perl interface I have "perl -MCPAN -e 'install Crypt::GCrypt'" and installed it successfully. I attempted to run the code in Perldoc, but get this error Can't locate object method "new" via package "GCrypt::Cipher" (perhaps you forgot to load "GCrypt::

Re: Crypt::GCrypt error on new method

2007-05-23 Thread Mike Blezien
- Original Message - From: "JOHN FISHER" <[EMAIL PROTECTED]> To: Sent: Wednesday, May 23, 2007 10:32 AM Subject: Crypt::GCrypt error on new method I am attempting to use gcrypt using a Perl interface I have "perl -MCPAN -e 'install Crypt::GCrypt'" and installed it successfully. I a

Global varables

2007-05-23 Thread Ben Edwards
Ime a bit confused about globals, I know they should be used with care but Currently I am using $::var witch seems to work. 'our var' also seems to work. Cant find any documentation with a discussion of this that answerers my question totally. what is the conversion with globals? Regards,

Re: parsing html data

2007-05-23 Thread xavier mas
El Martes 22 Mayo 2007 22:38, [EMAIL PROTECTED] escribió: > Hi, > > If the problem is to get dictionary translation, I think you should not > work directkly with LWP or WWW::Mechanize. Those modules provides > convinient way to get the answer in HTML. This will force you to hack html > files. > > A

Re: Global varables

2007-05-23 Thread Rob Dixon
Ben Edwards wrote: Ime a bit confused about globals, I know they should be used with care but Currently I am using $::var witch seems to work. There's no reason to use $::var - it's the same as $main::var so use that if it's what you mean. 'our var' also seems to work. Work how? C

Re: Global varables

2007-05-23 Thread Rob Dixon
Ben Edwards wrote: On 23/05/07, Rob Dixon <[EMAIL PROTECTED]> wrote: Ben Edwards wrote: > > Ime a bit confused about globals, I know they should be used with care > but > > Currently I am using $::var witch seems to work. There's no reason to use $::var - it's the same as $main::var so use

Re: Global varables

2007-05-23 Thread John W. Krahn
Ben Edwards wrote: > Ime a bit confused about globals, I know they should be used with care > but Some of Perl's special variables like $_, $\ etc. are global, and yes they should be used with care. perldoc perlvar > Currently I am using $::var witch seems to work. $::var is a package vari

Re: Global varables

2007-05-23 Thread Martin Barth
Hi, seems that there is one msg of you missing... if you want to know something about good style: perldoc perlstyle. there you can find some stuff about (package) globals. if you have a big application maybe you want a data abstraction package which should containt the database handle? -- To u

Re: syscall getpwnam and changing authetication on system

2007-05-23 Thread Tom Phoenix
On 5/22/07, Martin Barth <[EMAIL PROTECTED]> wrote: afer trying a lot of stuff i figured out that following code line works: my ($login,$pass,$uid,$gid) = (getpwnam($user),rand); without rand it's still the old user... can anyone explain why perl seems to cache this? (even without eval) Wel