Re: REGEX help!

2004-01-13 Thread Jamie Murray
Hey Alex, I jumped a little quick there, the previous post does work but I had a doh moment and forgot your upper range match could only be 254 at most. Sorry about that. if($num =~ /^[0-2][0-5][0-4]\.[0-2][0-5][0-4]\.[0-2][0-5][0-4]\.[0-2][0-5][0-4]$/) after each class [] use {num,num} to

Re: REGEX help!

2004-01-13 Thread Raul Davletshin
f ($ip =~ /^\d[0-254]\.\d[0-254]\.\d[0-254]\.\d[0-254]$/) incorect way of matching ip address, it will work fore 61.14.95.02, but will not work for 66.18.99.07. The problem here you just trying to match 2 digital number instead of 3 digits. For example using [] [aDc] true for a but not for aa,

Re: REGEX help!

2004-01-13 Thread Glenn Linderman
On approximately 1/12/2004 8:36 PM, came the following characters from the keyboard of Jamie Murray: Hey Alex, I jumped a little quick there, the previous post does work but I had a doh moment and forgot your upper range match could only be 254 at most. Sorry about that. if($num =~

Re: REGEX help!

2004-01-13 Thread $Bill Luebkert
Jamie Murray wrote: Hey Alex, I jumped a little quick there, the previous post does work but I had a doh moment and forgot your upper range match could only be 254 at most. Sorry about that. if($num =~ /^[0-2][0-5][0-4]\.[0-2][0-5][0-4]\.[0-2][0-5][0-4]\.[0-2][0-5][0-4]$/) ^^^ ^^^

Copying directories.

2004-01-13 Thread Beckett Richard-qswi266
Guys, I thought this woule be a lot easier than it seems... All I want to do is to copy a directory, and everything it contains (whatever this may be) to a new directory. I (finally) managed it with a system command: if (system xcopy /E/I/C \$default_path\ \$new_path\) {print Copy

Re: Copying directories.

2004-01-13 Thread Tfbsr Bertrand
Found this bit of code on the web recently... sub copydir { my ($dir, $to) = @_; print "copying $dir to $to\n"; opendir IN, $dir or die "what is this: $dir"; my @list = readdir IN; closedir IN; if (! -d $to) { mkdir $to, 0777; } foreach my $i (@list) { my $file = "$dir/$i"; if ( -d

Re: Copying directories.

2004-01-13 Thread Johan Lindstrom
At 11:08 2004-01-13, Beckett Richard-qswi266 wrote: I thought this woule be a lot easier than it seems... All I want to do is to copy a directory, and everything it contains (whatever this may be) to a new directory. -snip- What's the nice and easy way to do this? The CPAN way of course ;)

network inventory, how do YOU do it?

2004-01-13 Thread Hon Shi
How does one go out and inventory his network. In other words, given a hot IP (it pings) how can you discover just exactly what is there? Don't write anything for me but just generally describe the method. It's generally a W2K world, but we have net phones, unix boxes, printers and Thanks

Delphi problem (It _is_ related).

2004-01-13 Thread Beckett Richard-qswi266
Guys, I've just been handed a GUI based program that's been written in Delphi 7 (whatever that is). I think that Delphi is a GUI builder that's based on Pascal. Does anyone know if there's a Perl vesrion, or can I convert what's already been done into perl somehow? Or is it time to learn

Re: REGEX help!

2004-01-13 Thread Jamie Murray
BiLL, If you check my second post I made the correction but I'm still correct in my example and method. Actually the e-mail from Raul Davletshin pretty much verifys what I had also stated and he's also correct. As for explaining [0-2] 0 or 1 or 2 are all possibilities of course but only

Re: Delphi problem (It _is_ related).

2004-01-13 Thread Johan Lindstrom
At 13:47 2004-01-13, Beckett Richard-qswi266 wrote: I've just been handed a GUI based program that's been written in Delphi 7 (whatever that is). I think that Delphi is a GUI builder that's based on Pascal. Does anyone know if there's a Perl vesrion, or can I convert what's already been done into

RE: In your opinion, what's a good second languange to learn?

2004-01-13 Thread Chris
This would depend on what you plan to program in the future. I.e. c/c++ and VB would be good if you want to get into Windows application development, Java/c# would be good to learn for mobile devices. Every language has it's pros and cons for a given platform or use. Regards, Chris

Help Mee...

2004-01-13 Thread Asim Siddiqui
Hello, Its a PERL API problem.Would someone help... Like in VB I've written a script that: BitBlt(Picture1.hdc,Picture1.current_X,Picture1.current_Y,Picture1.Width,Picture1.Height,Picture2.hdc,Picture2.current_X,Picture2.current_Y,HC002) Now I've made it completely rewritten in PERL but only aq

RE: Press any key to exit

2004-01-13 Thread Thomas, Mark - BLS CTR
Anyone have a better idea of how to do press any key to exit than the example below. A google search only yielded the same idea I had Interesting how people tend to start and end searches these days with Google. Next time you may want to check the FAQ. The answer to this question is in

BitBlt (was: Help Mee...)

2004-01-13 Thread Johan Lindstrom
At 19:45 2004-01-13, Asim Siddiqui wrote: BitBlt(Picture1.hdc,Picture1.current_X,Picture1.current_Y,Picture1.Width,Picture1.Height,Picture2.hdc,Picture2.current_X,Picture2.current_Y,HC002) Do you use Win32::API to call this routine? What does Perl code that defines this routine look like? Now

Re: REGEX help!

2004-01-13 Thread Glenn Linderman
On approximately 1/13/2004 6:49 AM, came the following characters from the keyboard of Jamie Murray: Hi guys, I have seen my error which I have overlooked and don't mind admitting it. : ) Course don't hold it against me cause I'm just eager to learn and try things out. My regex works it matches

RE: network inventory, how do YOU do it?

2004-01-13 Thread Jarvis, John
To get a physical inventory: Given a hot IP, SNMP works well (low bandwidth, widely implemented, lots of useful info). Unfortunately, 'Discovery' can be a problem if you haven't enabled your network hosts to respond (Windows pc's are off by default). Also, 'Net::NBName' can deliver Windows PC

RE: network inventory, how do YOU do it?

2004-01-13 Thread Javier Nunez
The problem that I got it was to make an inventory of what it was installed in the servers of our world wide network. I got several options to retrieve the name and OS that were running the servers in order to know where the software was installed. Like we do not know if the IP address were in

Re: REGEX help!

2004-01-13 Thread Jamie Murray
Hi Glenn, I have worked on this further and looked at some of the previous posts. I have tried this with all different combinations of ip address and this has worked. Of course I got the idea from a previous post from Alex and Mark Thomas. Please understand I could have just copied and pasted

Re: Press any key to exit

2004-01-13 Thread Yeoh Yiu
Aaron.Tesch [EMAIL PROTECTED] writes: This will work for all of your Standard Keyboard keys. (does not include Funcion keys. What about ESC or shift ? use Term::ReadKey; END { ReadMode ('restore'); } $|=1; my $char = ; print Press Any Key to Continue:; # character method

Re: REGEX help!

2004-01-13 Thread Glenn Linderman
On approximately 1/13/2004 7:01 PM, came the following characters from the keyboard of Jamie Murray: Hi Glenn, I have worked on this further and looked at some of the previous posts. I have tried this with all different combinations of ip address and this has worked. Of course I got the idea from

Re: REGEX help!

2004-01-13 Thread Jamie Murray
Thanks for the discussion,clear explanation and advice Glenn. - Original Message - From: Glenn Linderman [EMAIL PROTECTED] To: Jamie Murray [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, January 14, 2004 12:48 AM Subject: Re: REGEX help! On approximately 1/13/2004 7:01 PM,

Re: REGEX help!

2004-01-13 Thread Mike Jackson
I think this is why $Bill said use the syscall rather than the RE - IPs are also legally expressed as the raw 32 bit number in decimal, or as a subset of the dotted quad only including the elements required to dis-ambiguate depending on the subnet mask (with a subnet mask of 255.0.0.0, 127. is a