Re: single quote and substitutions

2002-12-29 Thread Adriano Allora
Venerdì, 27 Dic 2002, alle 20:11 Europe/Rome, Dan Muey ha scritto: Have you tried doing the regex without the vars? s/(name1|name2)/(surname1|surname2)/g; Does that do what you want? I'd prefer do not do it in this way, because I don't know how many (and what kind of) $originals and $news I'l

Perl editors

2002-12-29 Thread Gavin Laking
Hi folks, I'm currently using a mixture of Quanta[1], jEdit[2] and Kate[3] (all Linux) for my Perl editing needs, but I'm wondering if there are any specialised editors(preferably free) which others are using. In my ideal world I'd like an editor that is not console/terminal based, (I prefer GTK,

Re: ANDing IP addresses

2002-12-29 Thread John W. Krahn
James Kipp wrote: > > Happy Hollidays Hello, > I want to bitwize AND 2 IP adr strings, not sure of how to pack() them to be > able to AND them. before i start playing with pack,sprintf,socket,etc.. I > was wondering if someone already had a way. I wrote this a while ago, it may give you some id

Re: single quote and substitutions

2002-12-29 Thread John W. Krahn
Adriano Allora wrote: > > Hi to all, Hello, > I need to substitute in a text a serie of word with another serie of > word (for example: when I have the name I want the correct surname). > Modifying a someone else script I wrote this one: > > #!/usr/bin/perl -w > > my $original = '(name1|name2)

Re: Scalar reference, pointer to pointer meaning

2002-12-29 Thread Gary Hawkins
Using VerQueryValue for file version information on Windows > What I expected to find in $lplpBuffer is instead being > written to an unused part of the full buffer ($lpFullBuffer). Got it. Prints like so: c:\windows\system32\version.dll CompanyName Microsoft Corporation

Re: Scalar reference, pointer to pointer meaning

2002-12-29 Thread Rob Dixon
> Using VerQueryValue for file version information on Windows > > > What I expected to find in $lplpBuffer is instead being > > written to an unused part of the full buffer ($lpFullBuffer). As far as I know, Windows never hands back a newly-allocated data buffer to you. The idea is that you call G

Resizing an image

2002-12-29 Thread Francesc Dantí
I need to resize a JPEG image. (reduce) I'd writen a script that uses GD module. The problem is that i can't install it in my sistem. Does anyone knows GD dependencies? Normally, CPAN knows modules dependencies and it automaticly install requierements, but it returns me errors* is there any requ

Re: file into memory

2002-12-29 Thread Jenda Krynicky
> On Tue, Dec 24, 2002 at 10:44:29AM -0800, R. Joseph Newton wrote: > > Really? In that case, you may be vastly underestimating the cost of > > I/O on performance. Bear in mind that memory has a responce time in > > the 10- ns range, while disk accesses range in the milliseconds, > > while your p

Re: Mail Attachment Corrupted... please help

2002-12-29 Thread Jenda Krynicky
From: "Yupapa" <[EMAIL PROTECTED]> > nevermind... found out what was wrong!! > thank you for reading BTW :p > The size of the $Buffer matters doesn't it ? ;-) > "Yupapa" <[EMAIL PROTECTED]> źśźgŠóślĽó > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > HiHi~ > > > > The problem is about EMAIL. > >

Re: single quote and substitutions

2002-12-29 Thread Adriano Allora
ok, thank you again. the version with the exploded list in the regexp did non works very well (it substituted bot the first and the second element of the pattern with a string similar to this: (surname1|surname2)). (but your second suggestion was perfect) at this time I solved my problem in this

Re: Perl editors

2002-12-29 Thread R. Joseph Newton
Hi Gavin, We had quite an extensive discussion, and a very good-humored one, recently. It is still on the archives: http://archive.develooper.com/beginners%40perl.org/ with the originating post: # Editors, Paul Kraus <2002-12-17> Unfortunately, I didn't see any input on IDE-style editors. A

GIMP, Perl, and a graph pattern

2002-12-29 Thread al
Greetings, Unlike most users of GIMP, I use the program for palaeographic research on ancient texts; it's faster and more efficient than any program I have tried (incl. Photoshop). In working with ancient writing systems on the photographic level, something that would be very helpful is a transpa

Module for dropping established connections

2002-12-29 Thread david odell
I know the module is out there. I want to be able to list connections ( just like in netstat ) and then have the ability to drop all the connections that are in TIME_WAIT status. On linux I would use a combination of netstat and iptables but this is for W2K. Thanks in advance. -- To unsubscrib

Re: GIMP, Perl, and a graph pattern

2002-12-29 Thread Christopher Kruslicky
On Sunday 29 December 2002 04:03 pm, al wrote: > Greetings, > > Unlike most users of GIMP, I use the program for palaeographic > research on ancient texts; it's faster and more efficient than any > program I have tried (incl. Photoshop). In working with ancient > writing systems on the photographi

Bad file descriptor Net::FTP

2002-12-29 Thread Nigel Peck - MIS Web Design
I'm getting Bad file descriptor doing $ftp->ls(), anyone had this? Running from Win2k to a Solaris ftp server. TIA Nigel MIS Web Design http://www.miswebdesign.com/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Resizing an image

2002-12-29 Thread Wiggins d'Anconia
It appears that GD is dependent on libpng a C library used to manipulate PNG files, which I don't believe CPAN will install. http://www.libpng.org/pub/png/ You should be able to install this library and then point the GD module installer at that library to compile the module. http://danconia.o

Re: GIMP, Perl, and a graph pattern

2002-12-29 Thread Wiggins d'Anconia
If you are still looking to Perl for this functionality, you should have a look at the GD module and the PerlMagick module. http://search.cpan.org/author/LDS/GD-2.05/GD.pm http://search.cpan.org/author/JCRISTY/PerlMagick-5.51/Magick.pm Like the Gimp you might be able to use one or both of the mo

Directory and its sub-directory disk usage: Windows '98

2002-12-29 Thread Rajendra Babu, Praveen
Hi All, This is in Windows '98. I am writing a script to find the entire directory space(i.e. including sub-directories) occupied from an input directory name. Eg. If at the command prompt I give something like, "perl dir_size.pl h:\raps\test\prajendr", the output should be the entire disk

RE: Directory and its sub-directory disk usage: Windows '98

2002-12-29 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Use File::Find and from it's examples you should be able to do all that you need from within Perl. Wags ;) -Original Message- From: Rajendra Babu, Praveen [mailto:[EMAIL PROTECTED]] Sent: Sunday, December 29, 2002 16:08 To: '[EMAIL PROTECTED]' Subject: Directory and its sub-direct

Re: Directory and its sub-directory disk usage: Windows '98

2002-12-29 Thread Mark Goland
unless you want to recurse the tree this will do it, unless(opendir local $TMP,$ARGV[0] ){ print "-invalid directory-\n"; print "USAGE:\n\t\t$0 directory to parse"; exit 1; } chomp (@FILES=`dir /s /b $ARGV[0]`); for ( @FILES ){ ( $Size+= (stat $_)[7] ); } print "TOT

Term::ReadLine examples lacking

2002-12-29 Thread Harry Putnam
I'm having a heck of a time finding examples of using Term::ReadLine to allow editing of user input to perl programs. perldoc Term::ReadLine, at my low level of skill, reads like semi gibberish and I see no simple examples. My needs are pretty simple. I wnat to allow the user some kind of line

RE: Directory and its sub-directory disk usage: Windows '98

2002-12-29 Thread Rajendra Babu, Praveen
Many thanks Mark - a real compact one ! Something exactly I was looking for. I am n't sure, instead of "stat" function we could use "-s " (-s, returns the number of bytes of the file size) operator, to reduce the function call overhead ?! Also, wanted to let know, I found the re-direction of the

Re: two-way socket troubleshooting

2002-12-29 Thread Mark Goland
ok, the problem was with send and read. I think send is used with msg passing. If you are going to use raw sockets, then use raw writes and reads. I tested this on a windows machine, so might have to change a few things on *niX. Server: use Socket; $SOMAXCONN=2; socket(SERVER, AF_INET, SOCK_ST