Re: s/// Vs tr///

2004-04-27 Thread Sumanth Sharma
"Owen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Wed, 28 Apr 2004 10:42:01 +0530 > "Sumanth Sharma" <[EMAIL PROTECTED]> wrote: > > > Can you help me figure out why need tr/// when you have s/// and > > Vice versa ( NO, s/// is more powerful?). > > Well I would say th

Re: s/// Vs tr///

2004-04-27 Thread Owen
On Wed, 28 Apr 2004 10:42:01 +0530 "Sumanth Sharma" <[EMAIL PROTECTED]> wrote: > Can you help me figure out why need tr/// when you have s/// and > Vice versa ( NO, s/// is more powerful?). Well I would say that the way they operate is different. tr/// looks at each character and replace

using packPropagate

2004-04-27 Thread N, Guruguhan \(GEAE, Foreign National, EACOE\)
Hi All, I have created a label, entry, button and another label widgets in a frame. The frame gets resized automatically and to control this I used packPropagate(0). When I used this, the last label is not getting displayed, which otherwise gets displayed. Can somebody tell me why is thi

Re: Why Perl

2004-04-27 Thread Brent Clark
Have a look at these links well wort it, I i was quite sad to see how PHP performed http://www.bagley.org/~doug/shootout/index2.shtml http://www.bagley.org/~doug/shootout/bench/ary3/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: s/// Vs tr///

2004-04-27 Thread Damon Allen Davison
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Sumanth Sharma wrote: | Can you help me figure out why need tr/// when you have s/// and | Vice versa ( NO, s/// is more powerful?). They don't do the same thing. tr/// (or y///) is the *transliteration* operator and can do things like replace an entir

Re: Perl and images

2004-04-27 Thread Jan Eden
Wiggins d Anconia wrote on 27.04.2004: >>Now the installation instructions tell me to >> >>>edit Makefile.PL and change LIBS and INC to include the >>>appropriate path information to the required libMagick library. >>>You will also need library search paths (-L) to JPEG, PNG, TIFF, >>>etc. librari

s/// Vs tr///

2004-04-27 Thread Sumanth Sharma
Hi, Can you help me figure out why need tr/// when you have s/// and Vice versa ( NO, s/// is more powerful?). Thanks in Advance, Sumanth Sharma -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Taking Over A Server With Regular Expressions

2004-04-27 Thread Randy W. Sims
On 4/27/2004 11:34 PM, Jason Dusek wrote: In the course of a war hacking, I found out that one of my friend's computers did no input validation for a search script - I could put whole perl regular expressions in it as input. Is this an exploitable vulnerability? What can you run inside of m//

Taking Over A Server With Regular Expressions

2004-04-27 Thread Jason Dusek
In the course of a war hacking, I found out that one of my friend's computers did no input validation for a search script - I could put whole perl regular expressions in it as input. Is this an exploitable vulnerability? What can you run inside of m// to get information about someone else's s

Re: Why Perl

2004-04-27 Thread Tim
At 10:52 AM 4/27/04 +0530, you wrote: Hi All, Can some list some points where perl really stands out from other languages. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Because it

PerlTK and updating a canvas

2004-04-27 Thread cc
Hi, I'm using ActivePerl w/ the Tk module on a Win2kPro system. I'm stumped in how to get the canvas updating at a reasonable speed. Right now, I use ->update(), but it takes a big chunk of the CPU cycles. Is there another way to update the canvas? Right now, I have a perlTk script which should

Re: erorr with "use constant"

2004-04-27 Thread Wiggins d Anconia
Please bottom post... > > why not use & for a function call? Aren't & and ( ) the same? > I used local originally b/c I wanted to use this globally from within the > function. Is there a preferred way to use local? > & and () may not be the same, see perldoc -q calling I am not sure what

Re: erorr with "use constant"

2004-04-27 Thread DBSMITH
why not use & for a function call? Aren't & and ( ) the same? I used local originally b/c I wanted to use this globally from within the function. Is there a preferred way to use local? thanks Derek B. Smith OhioHealth IT UNIX / TSM / EDM Teams 614-566-4145 "Wiggins d Anconia" <[EMAIL P

Re: File permission problem using File::Find !

2004-04-27 Thread John W. Krahn
Ravinder Arepally wrote: > > All, Hello, > I am seeing weird problem while using File::Find to copy files and directory > recursively in a specified directory. > > What I am trying to do is : > > 1) I need to copy everything from a specified directory to a known location. > 2) It should copy e

Re: erorr with "use constant"

2004-04-27 Thread Wiggins d Anconia
> > Can any provide some help? > I am getting this error: > > edm01:/usr/local/bin/perl>> perl -c tape_rotation_vaulting.pl > String found where operator expected at tape_rotation_vaulting.pl line 64, > near" > (Do you need to predeclare TWENTYONEDAYS_STRING?) > syntax error at tape_r

RE: perl mysql question

2004-04-27 Thread Christopher Lyon
Thanks, That did it! > -Original Message- > From: Daniel Staal [mailto:[EMAIL PROTECTED] > Sent: Tuesday, April 27, 2004 11:36 AM > To: Perl Beginners > Subject: RE: perl mysql question > > --As of Tuesday, April 27, 2004 8:30 AM -0700, Christopher Lyon is alleged > to have said: > > >

erorr with "use constant"

2004-04-27 Thread DBSMITH
Can any provide some help? I am getting this error: edm01:/usr/local/bin/perl>> perl -c tape_rotation_vaulting.pl String found where operator expected at tape_rotation_vaulting.pl line 64, near" (Do you need to predeclare TWENTYONEDAYS_STRING?) syntax error at tape_rotation_vaulting.pl l

RE: perl mysql question

2004-04-27 Thread Daniel Staal
--As of Tuesday, April 27, 2004 8:30 AM -0700, Christopher Lyon is alleged to have said: while ( @array = $sth->fetchrow_array() ) { print "$array[1] -> $array[3]\n"; $table{ "$array[1]" } = "$array[3]"; } my @keys = keys( %table ) ; while ( $key = pop( @keys ) ) { print "

Re: Replace ' ???

2004-04-27 Thread John W. Krahn
Lonewolf wrote: > > I have a function and can't seem to get this figured out. I have > apostrohe's in the file that I am pulling down, however I need to remove all > of the apostrophe's from the file before putting the file into the system. > > >$fields[0] =~ s/'//; > > > The apostrophe c

File permission problem using File::Find !

2004-04-27 Thread Ravinder Arepally
All, I am seeing weird problem while using File::Find to copy files and directory recursively in a specified directory. What I am trying to do is : 1) I need to copy everything from a specified directory to a known location. 2) It should copy even directories and files. I copied code and pa

Re: Compress and email file?

2004-04-27 Thread Kevin Old
On Tue, 2004-04-27 at 10:11, Sumanth Sharma wrote: > Here is a sample code, > use Compress::Zlib ; > . > . > . > . > > open(LOG,"<$log_file1")or print "cld not open $log_file1 for reading \n"; > $HTML_LOG = gzopen("$log_file2", "wb",1) or print "cld not open > $log_file2 for writing \n"; >

Re: undefined subroutine with recursives uses

2004-04-27 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (3li Marion) writes: >I encounter a very strange problem with interactions between main program >and several modules. > >If there is no interaction between modules (module1 calling module2 and >module2 calling module1) there is no problem with any

RE: perl mysql question

2004-04-27 Thread Christopher Lyon
> -Original Message- > From: Daniel Staal [mailto:[EMAIL PROTECTED] > Sent: Monday, April 26, 2004 8:54 PM > To: Perl Beginners > Subject: Re: perl mysql question > > --As of Monday, April 26, 2004 5:30 PM -0700, Christopher Lyon is alleged > to have said: > > > So, how to I get the value

Comments on this suggestion

2004-04-27 Thread B McKee
I tripped over this chunk of code today - #!/usr/bin/perl -w BEGIN { use File::Basename; unshift @INC, dirname($0); } use strict; use module_whatever; ... if I'm reading this right it would let you include a required module your users may or may not have with your own script. No

RE: Why Perl

2004-04-27 Thread John
Sumanth, Randy's response to your question ("...why perl?") is probably right on the money. In essence, you try to pick the right tool for the job and as perl has often been described as a "Swiss Army Chainsaw" of a programming language, you'd do well to look into it for your project. On a sociol

Re: Perl and images

2004-04-27 Thread Wiggins d Anconia
> nat wrote on 27.04.2004: > > >earlier <[EMAIL PROTECTED]> wrote... > > > >> Hi all, > >> > >> I need to convert JPEGS to Grayscale TIFS > >> Large Size JPEGS. > >> > >> Which is the best module I should opt for ? > > > >Imagemagick is really good. > > > >http://www.imagemagick.org

beginner needs help...thanks

2004-04-27 Thread William Kolln
Can Anyone Help...thanks if you can! I have an array called group_vals. I want to be able to return conditional statements according to the results after searching the array. I need it to go something like this: ## search array group_vals (optional) split the array in $grou

Re: Compress and email file?

2004-04-27 Thread Sumanth Sharma
Here is a sample code, use Compress::Zlib ; . . . . open(LOG,"<$log_file1")or print "cld not open $log_file1 for reading \n"; $HTML_LOG = gzopen("$log_file2", "wb",1) or print "cld not open $log_file2 for writing \n"; while () { $HTML_LOG->gzwrite($_) } clos

Re: Compress and email file?

2004-04-27 Thread Sumanth Sharma
"Graeme McLaren" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, I need to compress (gzip) an html file from a cgi script before > emailing the file, any ideas how? use Compress::Zlib; check at http://search.cpan.org/author/PMQS/Compress-Zlib-1.33/Zlib.pm for more info. -

Compress and email file?

2004-04-27 Thread Graeme McLaren
Hi, I need to compress (gzip) an html file from a cgi script before emailing the file, any ideas how? Cheers, Graeme :) _ It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger -- To unsubscr

Re: Perl and images

2004-04-27 Thread Jan Eden
nat wrote on 27.04.2004: >earlier <[EMAIL PROTECTED]> wrote... > >> Hi all, >> >> I need to convert JPEGS to Grayscale TIFS >> Large Size JPEGS. >> >> Which is the best module I should opt for ? > >Imagemagick is really good. > >http://www.imagemagick.org/www/perl.html > Funny, I ju

Re: confused - if function

2004-04-27 Thread William.Ampeh
It works, but it prints nothing. You are basically dealing with 3 variable here. the first 2 $date1 goes out of scope outside if {} else {}. Simply move your declaration out of the if statement. That is: my $date1 = ""; if ( your condition){ $date1=localtime; } else { . . }; pr

Re: Replace ' ???

2004-04-27 Thread James Edward Gray II
On Apr 27, 2004, at 8:23 AM, LoneWolf wrote: I have a function and can't seem to get this figured out. I have apostrohe's in the file that I am pulling down, however I need to remove all of the apostrophe's from the file before putting the file into the system. $fields[0] =~ s/'//; The ap

RE: Replace ' ???

2004-04-27 Thread West, William M
> >I have a function and can't seem to get this figured out. I have >apostrohe's in the file that I am pulling down, however I need to remove >all >of the apostrophe's from the file before putting the file into the system. 1. I'm not sure if ' has to be escaped when in a regex... so try one the

Replace ' ???

2004-04-27 Thread LoneWolf
I have a function and can't seem to get this figured out. I have apostrohe's in the file that I am pulling down, however I need to remove all of the apostrophe's from the file before putting the file into the system. $fields[0] =~ s/'//; The apostrophe character just needs to be removed and

Re: confused - if function

2004-04-27 Thread James Edward Gray II
On Apr 27, 2004, at 5:39 AM, mike wrote: I am getting a bit confused here, if I uncomment out the print statement within the if block $date1 prints, however the $date1 after the if block doesn't if ($date eq ''){ my $date1=localtime; #print $date1; } else { my $date1=~$date; }; print $date1; an

Re: beginner needs help

2004-04-27 Thread jesus velasquez
Thanks a lot for your time please reply very soon. muchas gracias por su tiempo por favor contestame muy pronto. Bye.Jesus Velasquez -- ___ http://mail.mexico.com ¡Disponible Ya! Utiliza el Outlook y Outlook Express para bajar tus correos por solo

Re: Perl and images

2004-04-27 Thread jesus velasquez
Thanks a lot for your time please reply very soon. muchas gracias por su tiempo por favor contestame muy pronto. Bye.Jesus Velasquez -- ___ http://mail.mexico.com ¡Disponible Ya! Utiliza el Outlook y Outlook Express para bajar tus correos por solo

confused - if function

2004-04-27 Thread mike
I am getting a bit confused here, if I uncomment out the print statement within the if block $date1 prints, however the $date1 after the if block doesn't if ($date eq ''){ my $date1=localtime; #print $date1; } else { my $date1=~$date; }; print $date1; any ideas -- To unsubscribe, e-mail: [EMAIL

Re: Perl and images

2004-04-27 Thread nat
earlier <[EMAIL PROTECTED]> wrote... > Hi all, > > I need to convert JPEGS to Grayscale TIFS > Large Size JPEGS. > > Which is the best module I should opt for ? Imagemagick is really good. http://www.imagemagick.org/www/perl.html nat -- http://photos.nuqe.net --

Re: beginner needs help

2004-04-27 Thread news
Can Anyone Help...thanks if you can! I have an array called group_vals. I want to be able to return conditional statements according to the results after searching the array. I need it to go something like this: ## search array group_vals (optional) split the array in $grou

Re: Can Perl be faster than C ?

2004-04-27 Thread Randy W. Sims
Sumanth Sharma wrote: Hi All, Are there instances/scenarios where Perl can really be faster that C/C++. (Do not include coding or design time here, consider only run-time). Perl is implemented in C. It can only be as fast as C, assuming a competent C programmer. Randy. -- To unsubscribe, e-

RE: perl mysql question

2004-04-27 Thread Bob Showalter
Christopher Lyon wrote: > Not sure if I should post this to beginners or not but there it goes. > > I have 10+ tables with some of the same information in each in table > of a mysql database. Here is an example: > [snip] > > I need to take the names and add the counts up for between each table >

Re: Can Perl be faster than C ?

2004-04-27 Thread Sumanth Sharma
Thanks John. I think I had seen some of those graphs. I was actually looking for this info at citeseer.org. "John W. Krahn" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Sumanth Sharma wrote: > > > > Hi All, > > Hello, > > > Are there instances/scenarios where Perl can really b

Re: undefined subroutine with recursives uses

2004-04-27 Thread Randy W. Sims
On 4/26/2004 12:01 PM, 3li Marion wrote: I encounter a very strange problem with interactions between main program and several modules. If there is no interaction between modules (module1 calling module2 and module2 calling module1) there is no problem with any sub each module. But if the mod1 us

Re: Can Perl be faster than C ?

2004-04-27 Thread John W. Krahn
Sumanth Sharma wrote: > > Hi All, Hello, > Are there instances/scenarios where Perl can really be faster that > C/C++. (Do not include coding or design time here, consider only run-time). Yes. Check out this URL for proof. :-) http://cm.bell-labs.com/cm/cs/who/bwk/interps/pap.html John

Perl and images

2004-04-27 Thread Nilay Puri, Noida
Hi all, I need to convert JPEGS to Grayscale TIFS Large Size JPEGS. Which is the best module I should opt for ? Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Can Perl be faster than C ?

2004-04-27 Thread Randy W. Sims
Robin Sheat wrote: On Tue, Apr 27, 2004 at 02:31:34AM -0400, Randy W. Sims wrote: Perl is implemented in C. It can only be as fast as C, assuming a competent C programmer. However, I imagine there are situations where a programmer who doesn't optimise for speed (or isn't a great programmer) will

Re: question

2004-04-27 Thread Robin Sheat
On Tue, Apr 27, 2004 at 12:12:31PM +0530, [EMAIL PROTECTED] wrote: > can i take input to associative array from the user like this: > %words=; Were it possible or not, it would be dangerous. A nice rule of programming to follow is that user input is evil and wrong, and must be checked. If someone

Re: question

2004-04-27 Thread Randy W. Sims
[EMAIL PROTECTED] wrote: can i take input to associative array from the user like this: %words=; well, yeah: perl -e '%h=;while (($k,$v)=each(%h)){chomp($k,$v);print "$k => $v\n"}' qw wq as sa ^D > qw => wq > as => sa but that's kinda limiting. Better to take it in steps: my %hash; while (chom