Re: selecting select as an option was Re: first steps with perl, alog reader

2003-11-17 Thread R. Joseph Newton
Jeff 'japhy' Pinyan wrote: > On Nov 16, R. Joseph Newton said: > > >sometimes. The perfect setup for the great Perl anonymous block: > > > >{ > >$| = 1; > > do stuff that really needs to be autoflushed > >} # Get things back to normal > > I think you want a 'local' in front of that

Re: Perl Equavlent

2003-11-17 Thread R. Joseph Newton
Mike Blezien wrote: > Hi, > > So if I use the int() this will provide the same results as this ceil() function > does... ?? Nope. Same as floor(). If you want to round, use: my $rounded = int ($float_value + 0.5); Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands

Re: File upload script

2003-11-17 Thread perl
I'm trying to allow users to upload their own webpages. I have both binary and text format. Although, its probably ok to upload the webpages in binary mode and it would bother the webserver. In any case, I'm wondering if use CGI is the package to use and if there is a cpan module that someone can

Capture a range from a mp3 track ?

2003-11-17 Thread Bee
I am trying to write a script which plays a range (input) from a mp3 file. Simply to say, a mp3 file is divided into 3 session, Audio data, audio header, and IDvX tags. What I will deal with my script is to get the bit rate from the header, and calc the start-end position of the data from the aud

Re: Logging to a Server via ftp.

2003-11-17 Thread Yupapa.com
Hello~ #!/usr/bin/perl use Net::FTP; use strict; my $ftp = Net::FTP->new("some.host.name", Debug => 0) or die "Cannot connect to some.host.name: $@"; $ftp->login("anonymous",'-anonymous@') or die "Cannot login ", $

beginners oops module

2003-11-17 Thread km
Hi all, i wanna look at the (source code of) modules which give a basic understanding of OOPS programming style in Perl. any pointers will be helpful . thanks, KM -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: An Alternative to Test::Harness was Re: external sub routine

2003-11-17 Thread Rajesh Dorairajan
Forgive me for not making myself clear in the first place. What I'm trying to do is create a Test framework for a server-class product that validates digital certificates using Perl. I've a driver script that reads configuration variables from an XML file using XML::Simple and execute a bunch of te

Re: Logging to a Server via ftp.

2003-11-17 Thread John
Thanks a lot Yupapa.com! - Original Message - From: "Yupapa.com" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, November 16, 2003 11:18 PM Subject: Re: Logging to a Server via ftp. > Hello~ > > > ___

Re: first steps with perl, a log reader

2003-11-17 Thread Guardian Angel
On Mon, 2003-11-17 at 06:19, R. Joseph Newton wrote: > Guardian Angel wrote: > > But now... i want to be more precise with my script. > > So i made 2 extra if loops, 1 is looking for errors, and if so, also > > check if there is no 127.0.0.x adres in it anymore (works so far :D) > > Whoa! This

Re: beginners oops module

2003-11-17 Thread Tore Aursand
On Mon, 17 Nov 2003 12:46:08 +0100, Tore Aursand wrote: >> i wanna look at the (source code of) modules which give a basic >> understanding of OOPS programming style in Perl. any pointers will be >> helpful . > Pointers to what? Just take a look at come of the OO modules/classes > out there, if

Re: File upload script

2003-11-17 Thread Tore Aursand
On Mon, 17 Nov 2003 01:08:46 -0800, perl wrote: > In any case, I'm wondering if use CGI is the package to use [...] Why don't you bother finding out? 'perldoc CGI'. Search for 'upload'. -- Tore Aursand <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands

Re: Perl Equavlent

2003-11-17 Thread Tore Aursand
On Sun, 16 Nov 2003 23:24:29 -0800, R. Joseph Newton wrote: > If you want to round, use: > my $rounded = int ($float_value + 0.5); ...which only works if you have a positive number. You must make it a bit more foolproof; my $rounded = ($nr > 0) ? int($nr + 0.5) : int($nr - 0.5); -- Tore Aur

Re: beginners oops module

2003-11-17 Thread Tore Aursand
On Mon, 17 Nov 2003 16:43:55 +0530, km wrote: > i wanna look at the (source code of) modules which give a basic > understanding of OOPS programming style in Perl. any pointers will be > helpful . Pointers to what? Just take a look at come of the OO modules/classes out there, if you want to. I

RE: beginners oops module

2003-11-17 Thread NYIMI Jose (BMB)
ch3 of "Object Oriented Perl" book by Conway is free at http://www.manning.com/getpage.html?project=conway&filename=Chapters.html Great reads ! José. -Original Message- From: km [mailto:[EMAIL PROTECTED] Sent: Monday, November 17, 2003 12:14 PM To: [EMAIL PROTECTED] Subject: beginners oo

Re: beginners oops module

2003-11-17 Thread James Edward Gray II
On Nov 17, 2003, at 7:47 AM, NYIMI Jose (BMB) wrote: ch3 of "Object Oriented Perl" book by Conway is free at http://www.manning.com/getpage.html? project=conway&filename=Chapters.html Great reads ! The rest of the book is excellent as well. I recommend it. James -- To unsubscribe, e-mail: [EM

Re: Perl Equavlent

2003-11-17 Thread James Edward Gray II
On Nov 17, 2003, at 1:24 AM, R. Joseph Newton wrote: Mike Blezien wrote: So if I use the int() this will provide the same results as this ceil() function does... ?? Nope. Same as floor(). If you want to round, use: my $rounded = int ($float_value + 0.5); Please read the rest of the thread be

Re: text replacement+

2003-11-17 Thread James Edward Gray II
On Nov 16, 2003, at 10:22 PM, R. Joseph Newton wrote: Kiko Uehara wrote: If my question doesn't have enough information, please let me know. Sure doesn't. The most important information concerning any program is what real-world purpose [even if simulated] it serves. The coding comes later. I'm

While or For

2003-11-17 Thread angie ahl
Hi list I keep getting hung up on deciding whether to use for or while for loops. Is one any better than other for straight forward loops, ie where you don't need next or last. Cheers Angie -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

When MUST you use 'map' ?

2003-11-17 Thread Jeff Westman
Hi, In my limited experience with perl, I've never had to use the 'amp' command, even though I see it used all the time. It seems to just be a short-cut of other commands/keywords that I've used. So, when do you HAVE to use 'map', when no other option makes sense?! -Jeff _

Re: selecting select as an option was Re: first steps with perl, a log reader

2003-11-17 Thread drieux
On Sunday, Nov 16, 2003, at 21:22 US/Pacific, R. Joseph Newton wrote: drieux wrote: I on the other hand have had the unpleasantry of FORGETTING that I was whacking new code in that was doing a 'select'. So one solution is to make sure that IF you do a select that you put things back where you fou

Re: When MUST you use 'map' ?

2003-11-17 Thread Gaurav Kumar Somani
wat does amp do?? On Mon, 17 Nov 2003, Jeff Westman wrote: > Hi, > > In my limited experience with perl, I've never had to use the 'amp' command, > even though I see it used all the time. It seems to just be a short-cut of > other commands/keywords that I've used. > > So, when do you HAVE to

Re: When MUST you use 'map' ?

2003-11-17 Thread drieux
On Monday, Nov 17, 2003, at 07:37 US/Pacific, Jeff Westman wrote: [..] In my limited experience with perl, I've never had to use the 'amp' command, even though I see it used all the time. It seems to just be a short-cut of other commands/keywords that I've used. So, when do you HAVE to use 'map',

RE: When MUST you use 'map' ?

2003-11-17 Thread Charles K. Clarkson
Jeff Westman <[EMAIL PROTECTED]> wrote: : : In my limited experience with perl, I've never had to use : the 'map' command, even though I see it used all the time. : It seems to just be a short-cut of other commands/keywords : that I've used. : : So, when do you HAVE to use 'map', when no other op

Re: While or For

2003-11-17 Thread Jeff 'japhy' Pinyan
On Nov 17, angie ahl said: >I keep getting hung up on deciding whether to use for or while for >loops. Well, it usually depends on how the code "reads". I use 'while' for loops based on a condition that will change in some execution of the block. while () { # eventually, will return unde

Re: While or For

2003-11-17 Thread drieux
On Monday, Nov 17, 2003, at 09:04 US/Pacific, Jeff 'japhy' Pinyan wrote: [..] which only reads ONE line at a time, whereas for () { ... } reads ALL the lines of the file at once, into a list. really good point there. but wouldn't the position been just a tad stronger had you noted that the abo

Dynamic Hash

2003-11-17 Thread Kent, Mr. John
Greetings, Am using perl to dynamically write some JavaScript code that creates cool drop down button menus by Ger Versluis found on http://www.dynamicdrive.com ( for those who want to know why). Have a directory structure in which the target files are located at various levels of sub-directo

r/w files

2003-11-17 Thread km
Hi all, I have a doubt in File handling concept. right now i am using such code : --snippet-start--- open my $h,$filename or die $!; # do something here --- close $h; snippet-end-- Is there any other efficient way while dealing with r/w op

Re: Starting Perl

2003-11-17 Thread Randal L. Schwartz
> "R" == R Joseph Newton <[EMAIL PROTECTED]> writes: R> I totally forgot, by the time I got to addressing .pm, that R> extensions in any context could be other than Evil in Randal's R> universe. See, I never ever said that. Odd how I would get misheard on this point. Extensions for *comma

Re: Dynamic Hash

2003-11-17 Thread drieux
On Monday, Nov 17, 2003, at 08:48 US/Pacific, Kent, Mr. John wrote: [..] For example my(%HASH); $HASH{$sub1}{$sub2}{$sub3} = $file1; $HASH{$sub1}{$sub2}{$sub3}{$sub4}{$sub5} = $file2; Here is what I tried, unsuccessfully no strict 'refs' # @TERMS is an array of each sub-directory name up to the o

[ADMIN] Re: File upload script

2003-11-17 Thread Casey West
It was Monday, November 17, 2003 when Tore Aursand took the soap box, saying: : On Mon, 17 Nov 2003 01:08:46 -0800, perl wrote: : > In any case, I'm wondering if use CGI is the package to use [...] : : Why don't you bother finding out? 'perldoc CGI'. Search for 'upload'. This isn't a proper res

Failed Test lib/odbm.t

2003-11-17 Thread Saskia van der Elst
Hi, I am in the process of installing perl-5.6.2 on my SuSE Linux 8.1 machine. After running 'make install' and ./perl harness, one test fails: lib/odbm.t How do I make Perl pass this test? Thanks, SvdE -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PRO

pagination of dbi results on html browser

2003-11-17 Thread A L
Hi Everyone at [EMAIL PROTECTED], Threre are two main questions: 1. How can I get to make results from mysql db to be displayed on web browser with pagination? Meaning, when there are too many results from the db, it only displays 20 results at a time-like that of google-and show links to rest o

Re: pagination of dbi results on html browser

2003-11-17 Thread Casey West
It was Monday, November 17, 2003 when A L took the soap box, saying: : Hi Everyone at [EMAIL PROTECTED], Threre are two main questions: : 1. How can I get to make results from mysql db to be displayed on web :browser with pagination? Meaning, when there are too many results :from the db, it

Re: Failed Test lib/odbm.t

2003-11-17 Thread drieux
On Monday, Nov 17, 2003, at 12:33 US/Pacific, Saskia van der Elst wrote: [..] I am in the process of installing perl-5.6.2 on my SuSE Linux 8.1 machine. After running 'make install' and ./perl harness, one test fails: lib/odbm.t well it would help if we knew what the 'failure' message was. make

RE: pagination of dbi results on html browser

2003-11-17 Thread Guay Jean-Sébastien
Hello A L, > When I search for this on the web, most of them give javascript results. I would like > to use Perl. Is it possible to do this with Perl? Why would you want to do something like that in Perl? When you click a button on a web form, the only time you want to call a server-side script

matching

2003-11-17 Thread Eric Walker
I have the following code to find a quote in a string and replace it with a slashquote. ie " goes to \" How do I get it to do more than one substitution in the string. $_ = $$Rules{$yes}{rule_desc}; s/"/\\"/; $$Rules{$yes}{rule_desc} = $_; newbie...

Re: matching

2003-11-17 Thread James Edward Gray II
On Nov 17, 2003, at 4:18 PM, Eric Walker wrote: I have the following code to find a quote in a string and replace it with a slashquote. ie " goes to \" How do I get it to do more than one substitution in the string. The /g modifier, for "global". $_ = $$Rules{$yes}{rule_desc}; s/"/\\"/; $$Rules{

Is it possible to send / receive cookies on an image

2003-11-17 Thread Dan Anderson
Is it possible to create a perl script that would send to the user an image and cookies. Depending on the cookie on the users computer, the user would get a certain picture. I figure I would have to use CGI, but what else, if anything, would I need to do? Thanks in advance, -Dan -- To unsub

Re: pagination of dbi results on html browser

2003-11-17 Thread Jeff 'japhy' Pinyan
On Nov 17, A L said: >1. How can I get to make results from mysql db to be displayed on web >browser with pagination? Meaning, when there are too many results from >the db, it only displays 20 results at a time-like that of google-and >show links to rest of the results by giving page numbers. I'

Re: matching

2003-11-17 Thread Eric Walker
Thanks that worked On Mon, 2003-11-17 at 15:27, James Edward Gray II wrote: On Nov 17, 2003, at 4:18 PM, Eric Walker wrote: > I have the following code to find a quote in a string and replace it > with a slashquote. > > ie " goes to \" > > How do I get it to

Re: Is it possible to send / receive cookies on an image

2003-11-17 Thread drieux
On Monday, Nov 17, 2003, at 14:33 US/Pacific, Dan Anderson wrote: Is it possible to create a perl script that would send to the user an image and cookies. Depending on the cookie on the users computer, the user would get a certain picture. I figure I would have to use CGI, but what else, if anyth

Re: pagination of dbi results on html browser

2003-11-17 Thread A L
Thanks so much for all your help! I'll look into it and let you how things turn out. Angela - Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard

the Scripting v. Coding Issue

2003-11-17 Thread drieux
volks, someone asked me off list some questions, and one that makes me giggle is this still, for me, fallacious distinction about the differences between scripting and coding. So I have put that rant up as: Hopefully it will

Failed Test lib/odbm.t

2003-11-17 Thread Saskia van der Elst
The problem: Failed Test Stat Wstat Total Fail Failed List of Failed --- lib/odbm.t 127 32512?? ?? % ?? 14 tests and 226 subtests skipped. Failed 1/375 test scripts, 99.73% okay. 0/15092 subtests failed, 1

Re: Failed Test lib/odbm.t

2003-11-17 Thread drieux
On Monday, Nov 17, 2003, at 17:51 US/Pacific, Saskia van der Elst wrote: [..] Drieux, thanks for your help! Saskia Stylish, I have never had to throw the '-U' and always configured them the old fashion way by answering all the questins all of which is ironic since good perlers of course know h

Re: matching

2003-11-17 Thread Tore Aursand
On Mon, 17 Nov 2003 15:18:47 -0700, Eric Walker wrote: > How do I get it to do more than one substitution in the string. By using the /g modifier. > $_ = $$Rules{$yes}{rule_desc}; No. Don't _ever_ try to set $_ yourself, unless you _really_ have to (which you don't in this case). > $_ = $$Rule

Re: first steps with perl, a log reader

2003-11-17 Thread R. Joseph Newton
Guardian Angel wrote: > On Mon, 2003-11-17 at 06:19, R. Joseph Newton wrote: > > Guardian Angel wrote: > > > > But now... i want to be more precise with my script. > > > So i made 2 extra if loops, 1 is looking for errors, and if so, also > > > check if there is no 127.0.0.x adres in it anymore (w

Re: When MUST you use 'map' ?

2003-11-17 Thread R. Joseph Newton
Jeff Westman wrote: > Hi, > > In my limited experience with perl, I've never had to use the 'amp' command, > even though I see it used all the time. It seems to just be a short-cut of > other commands/keywords that I've used. > > So, when do you HAVE to use 'map', when no other option makes sense