RE: Creating thumbnails (Newbie Question)...

2002-09-20 Thread Joel Hughes
Alex, the answer to this one is probably imagemagick. I have a small photos site as well and use imagemagick to create all the other sizes from the master image. After you have install image magick, the basic syntax is... use Image::Magick; $p = new

Re: Parsing an HTML document

2002-09-20 Thread Janek Schleicher
Mmkhajah wrote at Thu, 19 Sep 2002 19:47:53 +0200: I think this should work: $content =~ s/\[^\]+?\//g; ^ The question mark isn't necessary as the character class negates the . Cheerio, Janek -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

KEYWORD SEARCH

2002-09-20 Thread Daniel Hurtado Brenner
Hi: My site have a simple keyword search thaf work fine but i wishs modified because: 1. My site is in spanish version and some words in my data base (flat database) is writing using writing accent (´) Then for my simple keyword search is different for example condición (with accent in o) that

read /var/spool/mail

2002-09-20 Thread Hengky
hello guys, the basic is i like to create my own webmail, and read from /var/spool/mail i've already create the script to split and etc... but the problem is if i login as another user i cannot read from /var/spool/mail because the permission script... what i like to ask is... how to change

Re: Editing a file....

2002-09-20 Thread William McKee
On 19 Sep 2002 at 18:48, Greg Schiedler wrote: #!/usr/bin/perl # $username=$ARGV[0]; $password=$ARGV[1]; $newpassword=$ARGV[2]; # perl -pi -e 's/^($username)(\s+.*)($password)(.*)$/${1}${2}$newpassword${4}/' users-file.txt You're already in perl so you don't need to call it again.

MD5 SHA-1

2002-09-20 Thread Jimmy George
Hello World I thought 'encryption' was supposed to make the data transmitted from user to server into an unreadable block of garbage. Able to be decoded by the server of course - but of no use to any one else who tapped into the transmission or the file stored on the server. So what's the go?

use of s///

2002-09-20 Thread Igor Kutsyy
My script analizes .html text were a lot of tags. I need to delete tag: font The problem is that it writen in mixed ways: FONT FACE=Times New Roman, Times SIZE=2(äÅÎØ 18.09.02)/P /B/FONTIFONT SIZE=2 /I/FONTFONT face=Times New Roman, Times SIZE=2P***ðáòô ; ì äåòÉ/P /FONTBFONT size=2

RE: lots of numbers...

2002-09-20 Thread Janek Schleicher
Jeff Aa wrote at Thu, 19 Sep 2002 19:08:44 +0200: I liked your algorithm as it is quick and easy. But on the other hand the results aren't as good as possible. Actually, I do believe that the results are as good as possible, for any distribution of numbers. 8-) consider that the first pass

how to find memory leaks?

2002-09-20 Thread Angerstein
Hi, I have a deamon like programm, which runs tasks at give timestamps. This is in a while (1) {} if startjobx == time loop. Now i have the problem that one or more of my datastructures eats more and more memory. I delete every value after using it from my hashes or array from arrays, but it

RE: use of s///

2002-09-20 Thread Timothy Johnson
Try this: $_ =~ s/font.*?/font//gi; I can't test it, but in theory it should grab the shortest number of characters starting with font and ending with /font irregardless of case and replace them with nothing. -Original Message- From: Igor Kutsyy [mailto:[EMAIL PROTECTED]] Sent:

WG: how to find memory leaks?

2002-09-20 Thread Angerstein
-Ursprüngliche Nachricht- Von: Angerstein [mailto:[EMAIL PROTECTED]] Gesendet am: Freitag, 20. September 2002 09:30 An: [EMAIL PROTECTED] Betreff: how to find memory leaks? Hi, I have a deamon like programm, which runs tasks at give timestamps. This is in a while (1) {} if startjobx

RE: how to find memory leaks?

2002-09-20 Thread Timothy Johnson
Instead of delete()ing it, try lexically scoping your hashes using my(). You may find that letting the data structures go out of scope releases some memory to be reused by perl that you were missing. -Original Message- From: Angerstein [mailto:[EMAIL PROTECTED]] Sent: Friday, September

Re: use of s///

2002-09-20 Thread Robert Rendler
On Fri, 20 Sep 2002 10:02:18 +0300 Igor Kutsyy [EMAIL PROTECTED] wrote: My script analizes .html text were a lot of tags. I need to delete tag: font The problem is that it writen in mixed ways:FONT FACE=Times New Roman, Times SIZE=2(äÅÎØ 18.09.02)/P/B/FONTIFONT SIZE=2 /I/FONTFONT

RE: how to find memory leaks?

2002-09-20 Thread chad kellerman
here's my $.02 on this subject. Correct me if I am wrong. Once perl uses memory it does not want to let it go back to the system. I believe I have read the the developers are working on this. Since you have your script running as a daemon. It will not release a lot of memory back to the

Arg... what about $#hash $#array

2002-09-20 Thread Angerstein
I noticed if I want to print out the number of elements which should be stored in $#hash, but if i print it out i just get -1 !! What else can i do??? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

AW: Arg... what about $#hash $#array

2002-09-20 Thread Angerstein
ok... scalar (@array); scalar (%hash); can be used to get the number of elements. -Ursprüngliche Nachricht- Von: Angerstein [mailto:[EMAIL PROTECTED]] Gesendet am: Freitag, 20. September 2002 11:12 An: [EMAIL PROTECTED] Betreff: Arg... what about $#hash $#array I noticed if I

RE: Arg... what about $#hash $#array

2002-09-20 Thread nkuipers
scalar (@array); scalar (%hash); can be used to get the number of elements. For arrays, yes. For hashes, no. scalar %hash produces something that looks like this: 3/8, which is some measure of the number of buckets used by the hashing algo (efficiency). print scalar keys %hash, \n; will

Re: Arg... what about $#hash $#array

2002-09-20 Thread Sudarshan Raghavan
On Fri, 20 Sep 2002, Angerstein wrote: I noticed if I want to print out the number of elements which should be stored in $#hash, but if i print it out i just get -1 !! $#array (assuming the variable array is a perl array) will give you the last index of @array. For number of elements my

Re: Arg... what about $#hash $#array

2002-09-20 Thread Sudarshan Raghavan
On Sun, 22 Sep 2002, Sudarshan Raghavan wrote: my $hashcnt = keys(%hash) + values(%hash); Bad! my $hashcnt = keys(%hash) * 2; should do -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Installing DBD::mysql without installing mysql on local machine

2002-09-20 Thread Priss
Hi, Wonder if someone could help me, I am trying to install DBD::mysql module to access a remote mysql database. I am getting errors when running Makefile.PL: Can't exec mysql_config: No such file or directory at Makefile.PL line 169. I think I need to download some libraries? Do you know

is every sub know to a child?

2002-09-20 Thread Angerstein
I have a programm build with a lot of subs. Normally it should be possible to call every declared sub in the (fork) child process, right? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Mail::Send

2002-09-20 Thread Tom Allison
I was trying to use the Mail::Send module for shipping out some email, but I'm getting nothing. No errors, event with lots of die opportunities. No logs registering an attempt. Nothing. help? -- A mouse is an elephant built by the Japanese. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

reading /var/spool/mail

2002-09-20 Thread Hengky
hello guys, the basic is i like to create my own webmail, and read from /var/spool/mail i've already create the script to split and etc... but the problem is if i login as another user i cannot read from /var/spool/mail because the permission script... what i like to ask is... how to change

Parse XML

2002-09-20 Thread Dermot Paikkos
Hi, I am trying to parse the data out of am XML file. The file is below. Most of the data is easily grabbed but the keywords stretch over several newlines and there can anywhere between 0 and 20 entries. I have tried using /m and /s but these don't seem to work. I have set $/=image, I don't

Re: is every sub know to a child?

2002-09-20 Thread Jenda Krynicky
From: Angerstein [EMAIL PROTECTED] I have a programm build with a lot of subs. Normally it should be possible to call every declared sub in the (fork) child process, right? Yes. Jenda === [EMAIL PROTECTED] == http://Jenda.Krynicky.cz == There is a reason

Re: Parse XML

2002-09-20 Thread Jenda Krynicky
From: Dermot Paikkos [EMAIL PROTECTED] I am trying to parse the data out of am XML file. The file is below. Most of the data is easily grabbed but the keywords stretch over several newlines and there can anywhere between 0 and 20 entries. I have tried using /m and /s but these don't seem to

Encryption/Decryption

2002-09-20 Thread Rob Das
Hi List: Can anyone suggest a way/module to encrypt the contents of a file then decrypt it to get the contents back? I see many different modules on CPAN, but wondered if anyone can recommend one. I would be doing the encryption in one program, and the decryption in a different program. Any

RE: Encryption/Decryption

2002-09-20 Thread Nikola Janceski
I don't know how good the PGP module on CPAN is, but it looks promising the last time I looked. -Original Message- From: Rob Das [mailto:[EMAIL PROTECTED]] Sent: Friday, September 20, 2002 8:25 AM To: [EMAIL PROTECTED] Subject: Encryption/Decryption Hi List: Can anyone

Re: Breaking up a large source file into several pieces

2002-09-20 Thread Cricker
Yes, I think I'm clear on this; at least I hope so after banging my head against Programming Perl 3. Globals are dynamically-scoped whereis lexicals only exist in the file where they are declared with my. Page 57 says: Because the file is the largest possible lexical scope, a lexically-scoped

Problems with hash of hash referenzes

2002-09-20 Thread Theuerkorn Johannes
Hello List, i just got stuck with hashes, hashes of hashes and referenzes... I know i have to study a bit about all of that... :-( So i hope theres somebody who can tell me the way (or direction...) :-) I have a mysql Table and want the values out of the table in a hash of a hash: I have a

Removing duplicate entries from an array

2002-09-20 Thread Griggs Rob
Hi All, Whats the easiest way to remove duplicate entries from an array. Below is a script that removes ip addresses from a log file and adds them to an array. I then check the array to see if the value is already present and if it is i set a flag($exists) and then push that value into the array

Re: Removing duplicate entries from an array

2002-09-20 Thread Sudarshan Raghavan
On Fri, 20 Sep 2002, Griggs Rob wrote: Hi All, Whats the easiest way to remove duplicate entries from an array. Below is a script that removes ip addresses from a log file and adds them to an array. I then check the array to see if the value is already present and if it is i set a

Re: regex and ip address extraction

2002-09-20 Thread Dharmender Rai
try out (\d+\.){3}(\d+) but it won't take CIDR addresses and will not check the validity of the addresses. --- Griggs Rob [EMAIL PROTECTED] wrote: Hi Guys, The code below extracts an ip address from the /var/log/maillog file in the event of the line containing the words

Re: Problems with hash of hash referenzes

2002-09-20 Thread Jeff 'japhy' Pinyan
On Sep 20, Theuerkorn Johannes said: i just got stuck with hashes, hashes of hashes and referenzes... I know i have to study a bit about all of that... :-( So i hope theres somebody who can tell me the way (or direction...) :-) my %values; This should be declared INSIDE the while loop below:

Time change

2002-09-20 Thread Johnson, Fred
Hello all, I am working on a script to monitor the size of a particular file and the time stamp of the file. My objective is to alert some individuals via email when the file reaches a certain size and/or when the time stamp of the file does not match the current time. I'm stuck on how

Re: Removing duplicate entries from an array

2002-09-20 Thread Robin Cragg
How about.. if(/\[(\d+\.\d+\.\d+\.\d+)\].+reject=550/) { $IP{$1}++; } the your array of unique IPs is just keys %IP R At 14:14 20/09/2002 +0100, Griggs Rob wrote: Hi All, Whats the easiest way to remove duplicate entries from an array. Below is a script that removes ip

Re: file execution from a perl file

2002-09-20 Thread zentara
On Thu, 19 Sep 2002 15:01:08 +0200, [EMAIL PROTECTED] (Willem Pretorius) wrote: ok, now i have gotten the file to be executed from shell if i type : perl myfile.pl , and it work perfectly, but now, if i try and execute the same file from the web, i get the 'internal server error'.. what can be

RE: Time change

2002-09-20 Thread Bob Showalter
-Original Message- From: Johnson, Fred [mailto:[EMAIL PROTECTED]] Sent: Friday, September 20, 2002 10:13 AM To: [EMAIL PROTECTED] Subject: Time change Hello all, I am working on a script to monitor the size of a particular file and the time stamp of the file. My

Redirecting output

2002-09-20 Thread Jason Frisvold
Is there a way to redirect all the output (anything printed by the program itself and any error output) back into the program so the program can handle it? I'd like to be able to redirect it to itself so if there are any errors or unexpected output during a cron job, it'll all get mailed to

Re: Installing DBD::mysql without installing mysql on local machine

2002-09-20 Thread Jason Frisvold
If you use the RPM's, then you should be able to just install the client and shared rpm's ... I believe they have the needed files. On Fri, 2002-09-20 at 06:04, Priss wrote: Hi, Wonder if someone could help me, I am trying to install DBD::mysql module to access a remote mysql database. I

RE: Redirecting output

2002-09-20 Thread Bob Showalter
-Original Message- From: Jason Frisvold [mailto:[EMAIL PROTECTED]] Sent: Friday, September 20, 2002 11:52 AM To: [EMAIL PROTECTED] Subject: Redirecting output Is there a way to redirect all the output (anything printed by the program itself and any error output) back into the

Re: Breaking up a large source file into several pieces

2002-09-20 Thread drieux
On Friday, Sep 20, 2002, at 05:50 US/Pacific, Cricker wrote: [..] So what I was thinking of doing was something like: my ($a,$b); # main code ... #include subs1.pl ... where code in subs1.pl made reference to $a and $b. I realize that I can do this with globals. So that's what

Problems with hash of hash referenzes

2002-09-20 Thread Theuerkorn Johannes
Hi Japhy, wow, it´s been only the my %values declared outside the loop... But why has it to be declared inside, i thougt its global if I use it outside? Isn,t it? The Solution without %values at all is also pretty cool! Thanks! my %values = ( tstamp = $tstamp, ... ); This seems to be also OK

AW: AW: Problems with hash of hash referenzes

2002-09-20 Thread Theuerkorn Johannes
I guess i DO understand now! Thats really cool, was wondering about that for quite a while... I i did understand it right, i have a new scope inside the loop, but if i roll through the array, or hash i alwas!! refer to the variable defined in the main program, right? Nice of you! It´s been a

RE: how to find memory leaks?

2002-09-20 Thread david
Chad Kellerman wrote: here's my $.02 on this subject. Correct me if I am wrong. Once perl uses memory it does not want to let it go back to the system. I believe I have read the the developers are working on this. Since you have your script running as a daemon. It will not release a lot

Re: Mail::Send

2002-09-20 Thread david
Tom Allison wrote: I was trying to use the Mail::Send module for shipping out some email, but I'm getting nothing. No errors, event with lots of die opportunities. No logs registering an attempt. Nothing. help? any code? maybe you are using the module in a wrong way? maybe your mail

Re: Parse XML

2002-09-20 Thread david
Dermot Paikkos wrote: Hi, I am trying to parse the data out of am XML file. The file is below. Most of the data is easily grabbed but the keywords stretch over several newlines and there can anywhere between 0 and 20 entries. I have tried using /m and /s but these don't seem to work. I

RE: how to find memory leaks?

2002-09-20 Thread chad kellerman
Dave, Actually in each fork. I was tarring up information from another server with Net::SSH::Perl. The full tar ball was written to stdout and I would gzip in on the originating server. If I did not fork each tar the server would crash in a matter of minutes. But with the forks I actually

Re: AW: AW: Problems with hash of hash referenzes

2002-09-20 Thread Jeff 'japhy' Pinyan
On Sep 20, Theuerkorn Johannes said: btw, what is the 3D thing in $n =3D $_; ? I saw it quite often, but never knew... Your mail client doesn't like rendering certain characters. It turns a single apostrophe into =B4 (that should be an equals sign followed by B4), because character 0xB4 is an

Re: Problems with hash of hash referenzes

2002-09-20 Thread david
Theuerkorn Johannes wrote: Hello List, i just got stuck with hashes, hashes of hashes and referenzes... I know i have to study a bit about all of that... :-( So i hope theres somebody who can tell me the way (or direction...) :-) I have a mysql Table and want the values out of the table

Re: Redirecting output

2002-09-20 Thread david
Jason Frisvold wrote: Is there a way to redirect all the output (anything printed by the program itself and any error output) back into the program so the program can handle it? I'd like to be able to redirect it to itself so if there are any errors or unexpected output during a cron job,

RE: how to find memory leaks?

2002-09-20 Thread david
Chad Kellerman wrote: Dave, Actually in each fork. I was tarring up information from another server with Net::SSH::Perl. The full tar ball was written to stdout and I would gzip in on the originating server. If I did not fork each tar the server would crash in a matter of minutes.

RE: how to find memory leaks?

2002-09-20 Thread chad kellerman
I tried doing the same thing but my supervisor got mad. We aren't allowed to use any type of system call in our scripts. If the system call is in a perl module it's one thing but not in our code. system or exec anything that executes from /bin/sh even though it is so much nicer to do that,

RE: how to find memory leaks?

2002-09-20 Thread david
Chad Kellerman wrote: I tried doing the same thing but my supervisor got mad. We aren't allowed to use any type of system call in our scripts. If the system call is in a perl module it's one thing but not in our code. system or exec anything that executes from /bin/sh even though it

Re: how to find memory leaks?

2002-09-20 Thread chad kellerman
Frank- I think he believes it's more of a security issue then anything else. We only have three os's here. Solaris x86, Solaris sparc, and linux. So I don't think it's a port issue. --chad On Fri, 2002-09-20 at 15:49, Frank Wiles wrote: .--[ chad kellerman wrote (2002/09/20 at

Re: Mail::Send

2002-09-20 Thread Tom Allison
david wrote: Tom Allison wrote: I was trying to use the Mail::Send module for shipping out some email, but I'm getting nothing. No errors, event with lots of die opportunities. No logs registering an attempt. Nothing. help? any code? maybe you are using the module in a wrong way?

Re: is every sub know to a child?

2002-09-20 Thread John W. Krahn
Angerstein wrote: I have a programm build with a lot of subs. Normally it should be possible to call every declared sub in the (fork) child process, right? $ perl -e' sub one { print one } sub two { print two } die fork error\n unless defined( $pid = fork ); if ( $pid ) { sleep

Missing (defined($exe) mail prog on WINNT

2002-09-20 Thread rob
Hello list Ive tried to experiment with using perl for mail (calling form another program -Excel sheet macro) So I installed **MailTools-1.50** and used an example form Mail::Mailer at CPAN. http://search.cpan.org/author/MARKOV/MailTools-1.50/Mail/Send.pm When the program runs I get the

Help on Arrays - Beginner

2002-09-20 Thread Grant Hansen
Hello All, I am new to Perl and I will admit up front this is for a Perl course. However, the course is online and thus timely communication from the instructor is not always possible, so I am hoping someone will steer me in the right direction. The assignment has to do with taking a file,

RE: Help on Arrays - Beginner

2002-09-20 Thread Timothy Johnson
I'll give you a hint. This is perfectly legal: my @array = STDIN; Let me know if you still can't figure it out. -Original Message- From: Grant Hansen [mailto:[EMAIL PROTECTED]] Sent: Friday, September 20, 2002 6:03 PM To: [EMAIL PROTECTED] Subject: Help on Arrays - Beginner Hello

Re: Missing (defined($exe) mail prog on WINNT

2002-09-20 Thread Tim Musson
Hey rob, My MUA believes you used Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.0.0) Gecko/20020530 to write the following on Friday, September 20, 2002 at 7:36:37 PM. r When the program runs I get the following error, which seems to be r saying I need a system mail program...

Re: Help on Arrays - Beginner

2002-09-20 Thread Grant Hansen
I thought about that and I understand how that works, however the piece that I am missing and don't understand is how to access each element of the array, reverse the data and put the comma in. I know how to access the elements, it is the manipulating and putting back into the array for

file upload to MySql

2002-09-20 Thread Mariusz
I need to upload a file to a database. Could someone tell me how to do it? I know how to insert values into a table and upload files to a directory but how to combine the two correctly so the file gets uploaded to my MySql DB and I don't get any errors. A part of a script that does that would

Re: Missing (defined($exe) mail prog on WINNT

2002-09-20 Thread rob
Hi Tim Thanks for helping out r $fh = $msg-open; # some default mailer r # $fh = $msg-open('sendmail'); # explicit I am guessing this is where your problem is. It looks like the above is specifying the MTA to deliver the message. What are you setting it to?

RE: Help on Arrays - Beginner

2002-09-20 Thread Timothy Johnson
Okay, then, are you familiar with for/foreach? Once you've started the loop, it's essentially the same as your original while(). my @array = STDIN; foreach(@array){ do your name sort with $_... } @array = sort @array; (See below if this doesn't click for you, I haven't tested them, but