RE: finding text

2002-03-27 Thread Michael Gargiullo
Thank you, This gave me a great headstart Mike -Original Message- From: bob ackerman [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 28, 2002 12:58 AM To: [EMAIL PROTECTED] Subject: Re: finding text here is my code to parse a line: $_ = "abcdef"; # sample of a row @arr = /(.

RE: finding text

2002-03-27 Thread Michael Gargiullo
The actual html (Which I jst grabbed) is : Data source: ZIPList5 (March 2002) MailingNameStateCodeZIPCodeCo untyNameFIPSCodeHightstownNJ08520Mercer34021 Thats a section that contains what I want. The actual page is much larger. What I'm trying to extract is this: Hightstown

Re: finding text

2002-03-27 Thread bob ackerman
here is my code to parse a line: $_ = "abcdef"; # sample of a row @arr = /(.*?)<\/td>/g; # get chars between'td' tag and endtag into an array print $_,"\n" for @arr; # just checking result On Wednesday, March 27, 2002, at 09:48 PM, bob ackerman wrote: >

Re: finding text

2002-03-27 Thread bob ackerman
how do you mean to identify the row you want to capture? or are you saying you have the row and just want to know how to parse the line to get text between and ? On Wednesday, March 27, 2002, at 09:41 PM, Michael Gargiullo wrote: > I use LWP::Simple to get an HTML page. I only want to keep o

finding text

2002-03-27 Thread Michael Gargiullo
I use LWP::Simple to get an HTML page. I only want to keep one table row, and then only the data from the row in seperate fields. For example: page 1 some texta few links some textsome text some texta few links THE DATA I WANT MORE DATA I WANT I want to be able to set vars to each of the

Re: anonymous subroutine problem

2002-03-27 Thread bob ackerman
i copied the code as is, and got no error. are you sure line #29 is where you are calling $_incr_count->()? are you sure the code you are executing is what you posted? On Wednesday, March 27, 2002, at 06:47 PM, Paul Tremblay wrote: > I am coppying the code below directly from *Object Oriented

Re: URGENT: How do I downgrade perl

2002-03-27 Thread Matthew Harrison
Otherwise, can someone explain this error i got in my apache log? /usr/bin/perl: error while loading shared libraries: /usr/local/lib/perl5/5.6.1/i686-linux/auto/NDBM_File/NDBM_File.so: undefined symbol: dbm_open [Thu Mar 28 03:18:06 2002] [error] [client 192.168.0.1] Premature end of script h

URGENT: How do I downgrade perl

2002-03-27 Thread Matthew Harrison
I have just upgraded from Perl 5.6.0 to 5.6.1 and I have ofund I need to downgrade due to incompatibility with a web app I have. How do I downgrade? -- Matthew Harrison Internet/Network Services Administrator Peanut-Butter Cheesecake Hosting Services Genstate www.peanutbuttercheesecake.co.uk --

anonymous subroutine problem

2002-03-27 Thread Paul Tremblay
I am coppying the code below directly from *Object Oriented Perl* by Conway. (Error message is below.) package CD::Music; #use strict; # turn this off for testing purposes { my $_count = 0; sub get_count {$_count} my $_incr_count = sub {++$_count};#create an a

Re: How to thread in Perl?

2002-03-27 Thread Ahmed Moustafa
Chas Owens wrote: > I wrote some experimental code and it looks like you don't have to reap > the children (maybe this is just a C thing). So, is it OK to fork processes without using waitpid? In general, how are the servers (from the fork perspective - multithreading handling -) implemented in

RE: random word from array

2002-03-27 Thread Jeff 'japhy' Pinyan
On Mar 27, Timothy Johnson said: >Oops. That should be $get = int(rand(5)); No. That would give you a number between 0 and 4. The problem is not the rand(). The problem was the user didn't put parentheses around the elements of the array assignment. @array = ("This", "That", "Those"); pr

Re: random word from array

2002-03-27 Thread John W. Krahn
Wytch wrote: > > I decided to write a little script to help choose who will make the tea on > our gaming night [there is always an argument!] > > I thought I was doing quite well but it seems I am picked on by the > [non]random script I wrote! It seems to default to the first word in the > array

Re: Quieting 'Name "main::foo" only used once..."

2002-03-27 Thread jbajin
Don't use the -w... It's for warnings.. Then you won't get it. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: random word from array

2002-03-27 Thread Randal L. Schwartz
> "Wytch" == Wytch <[EMAIL PROTECTED]> writes: Wytch> I thought I was doing quite well but it seems I am picked on by the Wytch> [non]random script I wrote! It seems to default to the first word in the Wytch> array. Wytch> I used rand @array; Wytch> I think perhaps that I am thinking about

Quieting 'Name "main::foo" only used once..."

2002-03-27 Thread eric-perl
Hello, All: Is there a simple way to stop perl from complaining that a variable is only used once (possible typo at...)? e.g., #! /usr/bin/perl -w use Getopts::Std; getopts('d'); print "foo" if ($opt_d); If I use 'my()' perl complains that the variable is used in a void context. Sin

RE: random word from array

2002-03-27 Thread Timothy Johnson
Oops. That should be $get = int(rand(5)); -Original Message- From: Timothy Johnson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 27, 2002 4:12 PM To: 'Wytch'; [EMAIL PROTECTED] Subject: RE: random word from array The return value of rand() is a random number between 0 and the opti

RE: Testing for filehandles

2002-03-27 Thread eric-perl
On Wed, 27 Mar 2002, Bob Showalter wrote: > You can pass a filehandle glob to IO::Handle::opened(): Thanks, Bob! After reading the IO::Handle man page, I decided to distill this approach a bit further: print F if fileno(F); -- Eric P. Los Gatos, CA -- To unsubscribe, e-mail: [EMAIL PROTE

RE: random word from array

2002-03-27 Thread Timothy Johnson
The return value of rand() is a random number between 0 and the optional argument (1 by default). In this case there are 6 elements in the array, so we want a number between 0 and 5. So try this variation on your code: @tea = ("Meba", "Shaun", "Mark", "Jason", "Rick", "Dan"); $get = int(rand

Re: random word from array

2002-03-27 Thread James Taylor
Hrm, try this: @tea = "Meba", "Shaun", "Mark", "Jason", "Rick", "Dan"; srand (time ^ $$ ^ unpack "%L*", `ps axww | gzip`); print "$tea[rand(5)]\n"; On Wednesday 27 March 2002 03:25 pm, you wrote: > I decided to write a little script to help choose who will make the tea on > our gaming night [t

Re: what does this syntax error mean?

2002-03-27 Thread Jeff 'japhy' Pinyan
On Mar 27, Jeff 'japhy' Pinyan said: >So it sounds like you've used the tr/// operator and failed to close it >properly. Or the y/// operator. -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.o

Re: what does this syntax error mean?

2002-03-27 Thread Jeff 'japhy' Pinyan
On Mar 27, Wytch said: >Transliteration replacement not terminated at dot.pl line 18. > >What is a Transliteration replacement? First, you've shown us NO code, so we can't help correct your code. Second, you should check the error documentation: % perldoc perldiag and look for "Transliterat

RE: path for personal library

2002-03-27 Thread Timothy Johnson
If you are using ActiveState's ActivePerl, then you should have it at perl/site/lib/folder/module.pm. -Original Message- From: Paul Tremblay [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 27, 2002 8:57 AM To: [EMAIL PROTECTED] Subject: path for personal library I am trying to set up

RE: what does this syntax error mean?

2002-03-27 Thread Timothy Johnson
do you have a =~ tr/// in there somewhere? -Original Message- From: Wytch [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 27, 2002 1:13 PM To: [EMAIL PROTECTED] Subject: what does this syntax error mean? Transliteration replacement not terminated at dot.pl line 18. ??? What is a Tra

random word from array

2002-03-27 Thread Wytch
I decided to write a little script to help choose who will make the tea on our gaming night [there is always an argument!] I thought I was doing quite well but it seems I am picked on by the [non]random script I wrote! It seems to default to the first word in the array. I used rand @array; I th

what does this syntax error mean?

2002-03-27 Thread Wytch
Transliteration replacement not terminated at dot.pl line 18. ??? What is a Transliteration replacement? Anyone??? =O) Wytch -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

path for personal library

2002-03-27 Thread Paul Tremblay
I am trying to set up a library for my own modules. According to *Object Oreinted Perl,* (Conway), I should do the following: PERL5LIB=${PERL5LIB}:/home/paul/perl5 export PERL5LIB However, this doesn't work for me. If I put a module in the directory "/home/paul/perl5", then my perl scripts tell

Re: Maximum ,Minumum

2002-03-27 Thread Jonathan E. Paton
> > Does anyone help me about how I can > > find the maximum and minumum element > > of an array? > > my ( $min, $max ); > for ( @array ) { > $min = ( $min, $_ )[ $min >= $_ ]; > $max = ( $max, $_ )[ $max <= $_ ]; > } > > John > -- TIMTOWTDI showoff ;-) But you can simplify by usi

Re: Testing for filehandles

2002-03-27 Thread eric-perl
On Wed, 27 Mar 2002, Agustin Rivera wrote: > Ok, I've tried it both ways and it returns 1 (true) as the value. What am I > doing wrong? Agustin: 1. What *exactly* do you mean "both" ways? 2. References... >From the Getopt::Std man page: getopt('oDI'); # -o, -D & -I take arg. Sets o

changing $0 on solaris?

2002-03-27 Thread Ross Simpson
I'm trying to change the value of $0 in a perl script (so that it shows as something I define in ps). Directly modifying $0 works in linux, but on solaris it has no effect. Is there another way to do this, or does solaris not allow it? thanks Ross -- To unsubscribe, e-mail: [EMAIL PROTECTED]

Re: Testing for filehandles

2002-03-27 Thread Agustin Rivera
Ok, I've tried it both ways and it returns 1 (true) as the value. What am I doing wrong? #!/usr/bin/perl use strict; use Getopt::Std; my %opt; getopts('h', \%opt); print "$opt{h}\n"; Agustin Rivera Webmaster, Pollstar.com http://www.pollstar.com - Original Message - From: "Chas Ow

RE: Testing for filehandles

2002-03-27 Thread Bob Showalter
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, March 27, 2002 3:18 PM > To: Beginners Perl Mailing List > Subject: Testing for filehandles > > > Hello, All: > > I've looked around for an answer to this (The Camel Book, The > Ram Book, > pe

get parked domain name

2002-03-27 Thread Motherofperls
I just parked a domain name a few days ago and now I want to use it. But I can't seem to access it with the $ENV variables. I've tried $ENV{'SERVER_NAME'} Which I thought would do the trick! Anyone have any tricks up their sleeve? Thanks Tricia

Re: Testing for filehandles

2002-03-27 Thread eric-perl
On 27 Mar 2002, Chas Owens wrote: > Getopt::Std creates the $opt_n variables. To use it with use strict; in > place you must use the use vars ($opt_n); pragma as well. or just use > the getopts('n', \%opts); call. Then you can say $opts{n}. Agustin: Also from the Getopt::Std man page:

Re: Testing for filehandles

2002-03-27 Thread Chas Owens
Getopt::Std creates the $opt_n variables. To use it with use strict; in place you must use the use vars ($opt_n); pragma as well. or just use the getopts('n', \%opts); call. Then you can say $opts{n}. On Wed, 2002-03-27 at 16:46, Agustin Rivera wrote: > How would that work with use strict;? I

Re: Testing for filehandles

2002-03-27 Thread eric-perl
On Wed, 27 Mar 2002, Agustin Rivera wrote: > How would that work with use strict;? I tried it once and when I declared my > $opt_n before using getopts, it wouldn't work. Agustin: >From the Getopt::Std man page: Note that, if your code is running under the recommended `use strict

RE: Testing for filehandles

2002-03-27 Thread Timothy Johnson
I think in order for that to work, you might have to put use vars($opt_n) at the top of your script. To be honest, I don't use Getopts that much, maybe someone else would have a better idea? -Original Message- From: Agustin Rivera [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 27, 20

Re: Testing for filehandles

2002-03-27 Thread Agustin Rivera
How would that work with use strict;? I tried it once and when I declared my $opt_n before using getopts, it wouldn't work. Agustin Rivera Webmaster, Pollstar.com http://www.pollstar.com - Original Message - From: "Timothy Johnson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; "Beginner

RE: Testing for filehandles

2002-03-27 Thread eric-perl
Tim: I know, I know: I excluded the "or die" portion for readability/simplicity. On Wed, 27 Mar 2002, Timothy Johnson wrote: > You'd probably have better luck testing for the open() command's success I wrote: >> use Getopts::Std; >> getopts("n"); >> open(OPT_LOG,">/tmp/foo.txt") if ($opt_n); >

Re: Testing for filehandles

2002-03-27 Thread Chas Owens
On Wed, 2002-03-27 at 15:18, [EMAIL PROTECTED] wrote: > Hello, All: > > I've looked around for an answer to this (The Camel Book, The Ram Book, > perldoc, google.com, etc.) but can't find a thing: Is it possible to test > for the existence of a filehandle? > > I've got a small script that ope

RE: Testing for filehandles

2002-03-27 Thread Timothy Johnson
You'd probably have better luck testing for the open() command's success use Getopts::Std; getopts("n"); if($opt_n){ open(OPT_LOG,">/tmp/foo.txt") || die "Could not open foo.txt!\n"; } -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 27, 20

RE: Options to scripts

2002-03-27 Thread Timothy Johnson
Do a search for the GetOpt modules. -Original Message- From: James Kelty [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 27, 2002 1:40 PM To: [EMAIL PROTECTED] Subject: Options to scripts What is the best way/module for taking and using options to scripts I write? In your opinion...

Options to scripts

2002-03-27 Thread James Kelty
What is the best way/module for taking and using options to scripts I write? In your opinion... Thanks! -James James Kelty Sr. Unix Systems Administrator The Ashland Agency 541.488.0801 [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PRO

Testing for filehandles

2002-03-27 Thread eric-perl
Hello, All: I've looked around for an answer to this (The Camel Book, The Ram Book, perldoc, google.com, etc.) but can't find a thing: Is it possible to test for the existence of a filehandle? I've got a small script that opens a filehandle. If that filehandle exists, I'd like to print to it

Re: executing filename with ~ in perl

2002-03-27 Thread Paul Johnson
On Wed, Mar 27, 2002 at 11:24:16AM -0800, Agustin Rivera wrote: > x = "~/rambo/bin/script1"; You'll want to check out the glob function. perldoc -f glob -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMA

Re: .csv file to .tab file?

2002-03-27 Thread ERIC Lawson - x52010
Well, thanks for the info, and your reply to my question. However, it is often easier to ask and be answered than to try test cases. On Wed, 27 Mar 2002, Jenda Krynicky wrote: > From: ERIC Lawson - x52010 <[EMAIL PROTECTED]> > > > Does the module also handle cases where the esc

Re: LWP::Simple returns scalar; how to populate an array from it?

2002-03-27 Thread John Bodoni
"Agustin Rivera" wrote: > Try adding > > my @html=split(/\n/, $html); > foreach my $line(@html) > { > #process > } Thank you, Agustin, that did the trick! I played with many regexp combinations, but all more complicated than what you suggested. No wonder Perlsters are always grinning... J

Re: LWP::Simple returns scalar; how to populate an array from it?

2002-03-27 Thread Agustin Rivera
Try adding my @html=split(/\n/, $html); foreach my $line(@html) { #process } Agustin Rivera Webmaster, Pollstar.com http://www.pollstar.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

LWP::Simple returns scalar; how to populate an array from it?

2002-03-27 Thread John Bodoni
Hello, all. To snag a webpage, I'm using: use LWP::Simple; my $html = get(http://address.goes.here); # Outlook Express will probably mangle the webpage address above Awright, that's fine and it's working, but it's not quite what I need. I need to process the contents of that page line by l

Re: How do I get and save an image off of a web page

2002-03-27 Thread Brent Michalski
I just had to do this for a project and found that that HTML::LinkExtor module works perfect for this! There is even an example in the docs that shows how to filter out everything except images if i remember correctly. Just do a search for Extor at search.cpan.org Good luck! Brent

Re: executing filename with ~ in perl

2002-03-27 Thread Agustin Rivera
Well, the script thinks you're doing a search pattern, AND you're not using ~ properly. Try x = "~/rambo/bin/script1"; Agustin Rivera Webmaster, Pollstar.com http://www.pollstar.com - Original Message - From: "Roy Peters" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday,

Re: help on searching an array

2002-03-27 Thread Adam Wesselink
I'd split up the foreach loop and the conditional it might be a little clunky, but here's the basic idea. bolFound = false foreach (@members) { if (/($enqmem)/i) { bolFound = true; } } if (bolFound) { do stuff } else { do other stuff } At 18:54 27-03-02 +

Re: Search for a word in between words

2002-03-27 Thread John W. Krahn
Allison Ogle wrote: > > To give you even more information, in my datafile, the word that I am > searching for is 'marked' by the word in the line before it. For example, > the lines in my datafile look like.. > > line 1 > line 2 > line 2 > Installation > example > Installation > line 4 > line 5

RE: help on searching an array

2002-03-27 Thread Timothy Johnson
Here's one way. Instead of printing out the confirmation right away, I stored a 1 in the $ismem variable if one of the matches was true. Then I used it later to check if any of the names had matched. Another way would be to use a hash instead of an array so that you can check the index against

RE: help on searching an array

2002-03-27 Thread Nikola Janceski
You got the wrong algorithm. Try doing it with grep. perldoc -f grep foreach (@members) { if ( grep { #put your test/check here } @members ){ # they are a member } else { # they aren't } } > -Original Message- > From: Wytch

executing filename with ~ in perl

2002-03-27 Thread Roy Peters
I have the following $x = ~rambo/bin/script1; (where script1 is an executable shell script) $ret = `x`; The above will not work. However if I define $x = /home/apple/rambo/bin/script1; (ie I give a full pathname) $ret = `x`; This will work. How do I make the first example work? By the way,

Re: Maximum ,Minumum

2002-03-27 Thread John W. Krahn
Ozgur Genc wrote: > > Hi All, Hello, > Does anyone help me about how I can find the maximum and minumum element > of an array? my ( $min, $max ); for ( @array ) { $min = ( $min, $_ )[ $min >= $_ ]; $max = ( $max, $_ )[ $max <= $_ ]; } John -- use Perl; program fulfillment --

help on searching an array

2002-03-27 Thread Wytch
Hi, I am new to this list and to Perl. I decided after years of promises to my self that I would finally tackle programming. I started reading up on it and think I have got the basics but I am still very much a Perl virgin! I decided to try to write a little script [no practical application just

Re: Creating table for message board server tosave/delete/update messages

2002-03-27 Thread Dave K
Bruce: use warnings; use strict; use DBI; my $dbname = 'Bruce'; my $dbhostname = 'localhost'; my $user = 'root'; my $password = '' ; my $cs = "CREATE TABLE employee_Info (primary_key INT AUTO_INCREMENT NOT NULL, name CHAR(20), surname CHAR(20), employee_no CHAR(10), shoe_colour CHAR (

RE: Search for a word in between words

2002-03-27 Thread Timothy Johnson
If you know that the word you're looking for is going to be the next line after 'installation', you can try this: open(INFILE,"file.txt"); while(){ chomp($_); if($_ eq "Installation"){ $word = ; #assign the next line to the $word variable chomp $word; print $word;

Re: Batch creation of thumbnails

2002-03-27 Thread Randal L. Schwartz
> "John" == John Edwards <[EMAIL PROTECTED]> writes: John> Try the GD module. Here is some code I have for creating thumbnails John> (untested as it's stripped down from a bigger script). Thumbnails have a _ John> prepended to them. They're not great thumbs, there is no anti aliasing done Joh

Re: delete blank lines from a file?

2002-03-27 Thread Randal L. Schwartz
> "Timothy" == Timothy Johnson <[EMAIL PROTECTED]> writes: Timothy> Try this: Timothy> open(INFILE,"myfile.txt"); Timothy> open(OUTFILE,"SSlines.txt"); Timothy> while(){ Timothy>unless($_ eq "\n"){ #blank lines probably have only a \n Timothy> print OUTFILE $_; Timothy>} Timot

Re: Maximum ,Minumum

2002-03-27 Thread Randal L. Schwartz
> "Robert" == Robert Graham <[EMAIL PROTECTED]> writes: Robert> I see what you mean Robert> I assume the following would be a better way of going at it Robert> $max = $min = $data[0]; Robert> foreach $val (@data) { Robert> $min = $val<$min ? $val:$min; Robert> $max = $val>$max ? $val

Re: Maximum ,Minumum

2002-03-27 Thread Randal L. Schwartz
> "Robert" == Robert Graham <[EMAIL PROTECTED]> writes: Robert> Hi Ozgur Robert> You can use the following: Robert> @data = (10,45,2,439); Robert> ($min,$max) = (sort {$a <=> $b} @data)[0,$#data]; Too much work. ($min, $max) = (sort {$a <=> $b} @data)[0, -1]; It's one of our examp

Re: Socket Server

2002-03-27 Thread Scott Wahlstrom
Network Programming with Perl, by Lincoln Stein $30 @ Amazon: http://www.amazon.com/exec/obidos/ASIN/0201615711/qid=1017251419/sr=1-2/ref= sr_1_2/103-7134611-8896620 - Scott Wahlstrom root - Lab for Advanced Computing and the Nation

Socket Server

2002-03-27 Thread paul beckett (JIC)
I want to write a perl socket server app to communicate with a java TCP client. I've tried looking in the (O'Reilly) Programming Perl, which I've found quite overwhelming. Can anyone suggest a good place to find more information on this topic (starting with the real basics of listenting for and ac

Re: Search for a word in between words

2002-03-27 Thread Agustin Rivera
while() { $firstword=$middleword; $middleword=$lastword; $lastword=$_; if ($firstword eq "Installation" && $lastword eq "Installation") { print "FOUND $middleword\n"; } Would that work? Regards,` Agustin Rivera Webmaster, Pollstar.com http://www.pollstar.com --

Search for a word in between words

2002-03-27 Thread Allison Ogle
To give you even more information, in my datafile, the word that I am searching for is 'marked' by the word in the line before it. For example, the lines in my datafile look like.. line 1 line 2 line 2 Installation example Installation line 4 line 5 line 6 and all I want is the word in betwee

Re: How do I get and save an image off of a web page

2002-03-27 Thread Agustin Rivera
Sorry, should clarify that would just download an image for you (it's probably pretty obvious)... If I were to parse an image location off a webpage, I'd first spool up the whole page in a variable, break the variable down by the bracket '<' into an array, then parse each item of the array with t

Re: .csv file to .tab file?

2002-03-27 Thread Jenda Krynicky
From: ERIC Lawson - x52010 <[EMAIL PROTECTED]> > Does the module also handle cases where the escape character may be > multiple? For example, > > 1,10\,000,"some text, and so","some text" > > Eric There's nothing easier than to try. Jenda === [EMAIL PROTECTED] ==

Re: How do I get and save an image off of a web page

2002-03-27 Thread Agustin Rivera
This would do it... #!/usr/bin/perl use LWP::Simple; use strict; my $content=get("http://www.images.com/image.jpg";); open(OUT, ">image.jpg") or die $!; binmode(OUT); print OUT $content; close(OUT); Regards, Agustin Rivera Webmaster, Pollstar.com http://www.pollstar.com - Original Messa

RE: Transferring files from a client

2002-03-27 Thread Brian
U, perhaps if some thought is put into this you'll be able to figure out why you CAN'T do this. It's the same reason that you can't give a value. It's a security risk. If you could just grab any files you wanted off anybody's computer there would be worldwide confusion and the end of civil

Re: .csv file to .tab file?

2002-03-27 Thread ERIC Lawson - x52010
Does the module also handle cases where the escape character may be multiple? For example, 1,10\,000,"some text, and so","some text" Eric On Wed, 27 Mar 2002, Jenda Krynicky wrote: > From: Bud Rogers <[EMAIL PROTECTED]> > > Brian Volk wrote: > > > Is there a way to covert a .csv file

RE: search

2002-03-27 Thread Allison Ogle
I am reading a datafile and searching for a specific word. Any help is greatly appreciated. Thanks, Allison -Original Message- From: John Edwards [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 27, 2002 11:15 AM To: 'Allison Ogle'; a a Subject: RE: search http://www.m-w.com/home.

How do I get and save an image off of a web page

2002-03-27 Thread Guy Davis
I want to grab a web page via HTTP:Request and then parse it and grab an image off of it and save that image to the hard disk. Has anyone done this and/or can anyone point me in the right direction? Thanks, Guy Davis -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mai

Re: Maximum ,Minumum

2002-03-27 Thread Chas Owens
On Wed, 2002-03-27 at 07:25, Sudarsan Raghavan wrote: > Robert Graham wrote: > > > Hi Ozgur > > > > You can use the following: > > > > @data = (10,45,2,439); > > ($min,$max) = (sort {$a <=> $b} @data)[0,$#data]; > > IMHO sorting a list to find the max and min element is not a good idea. > Th

How Do I add a record to a table if it dont exist ??

2002-03-27 Thread FLAHERTY, JIM-CONT
I have a delima I want to add records to a table in mysql , only if that record isnt there , Help Code my $sth1 = $dbh -> prepare("select distinct testname from testhistory"); $sth1 -> execute or die " unable to execute query "; #$sth1 -> finish; my $array_ref1 = $sth1->fetchall_arrayref

RE: search

2002-03-27 Thread John Edwards
http://www.m-w.com/home.htm Oh, you mean in Perl?? Give more details. Are you looking for a word in a file? In an input string? $text = "this is a test string"; if ($text =~ /test/) { print "Found 'text' in string"; } John -Original Message- From: Allison Ogle [mailto:[EMAIL PROTE

I have a script that print test questions and grades them... how do I make them print a random order

2002-03-27 Thread FLAHERTY, JIM-CONT
I have a script that print test questions and grades them... how do I make them print a random order, and a certain amount ?? code $dbh =DBI ->connect($data_source, $username, $password) or die "cant connect to $data_source : my $dbh-> errstr\n"; my $sth1 = $dbh -> pre

Re: search

2002-03-27 Thread jbajin
How about trying something if you are going to go through a string.. grep //

search

2002-03-27 Thread Allison Ogle
Does anyone know how to search for a word? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

difference between 2 dates

2002-03-27 Thread Roy Peters
What is the best way to get the difference betwen 2 dates that I obtain from localtime I want to do something like $t1=localtime(); -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: best place to get Perl...

2002-03-27 Thread Timothy Johnson
Check out ActiveState's ActivePerl. http://www.activestate.com -Original Message- From: Chris H. To: [EMAIL PROTECTED] Sent: 3/27/02 2:05 AM Subject: Fw: best place to get Perl... ...for my system running Win 95 ?? I'm reading beginning Perl and need to start writing code asap...

Re: signal KILL

2002-03-27 Thread Connie Chan
sub getKill { somestatements..; return ($!) } #Main $dieMesg = getKill() ; another_process($dirMesg) - Original Message - From: "walter valenti" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, March 27, 2002 10:44 PM Subject: signal KILL > Hi, > > i've got a pro

Help ..trying to send HTML Email to clients on outlook 2k with MIME-Lite-HTML-1.8

2002-03-27 Thread FLAHERTY, JIM-CONT
I trying to send HTML Email to clients on outlook 2k with MIME-Lite-HTML-1.8 I want to send reports html enabled mail intead of the old text mail . I was working with this module from CPAN , help our am I going about it the wrong way Code #!/usr/bin/perl -w ### Get Date

FW: How to thread in Perl?

2002-03-27 Thread Richard Smith
Actually, it is a *NIX thing. There are non-blocking ways to reap children, at least in most modern *NIX systems. You probably also want to look at the documentation for the wait() function. It may explain why your experiment appeared to work. Anybody know how to do non-blocking waits in p

simlpe regular expressions

2002-03-27 Thread Naomi Arries
Hi all @str = 'abaabaaab' 1)To match 3 a's in $str I found /aaa/ and /a{3}/ I need more regex. 2)to match any number of 'a's, 3'b's and at least 1'c' I found /a*b{3}c+/ regex. I need more regex Could you help? bye naomi == Brought to you by Ananzi Shopping for specials, competitions and f

signal KILL

2002-03-27 Thread walter valenti
Hi, i've got a process that end with a "die". I want capture this kill with another process. How i can do??? Walter -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Maximum ,Minumum

2002-03-27 Thread Jonathan E. Paton
> > > IMHO sorting a list to find the max and min > > > element is not a good idea. The sort is of ^^^ > > > O(nlgn) and the usual run through the list > > > to find the max element is O(n). > > > > In general, it's not. > > I am not sure what you mean by this, sortin

Re: MIME::Lite - - "No data in this part"?

2002-03-27 Thread KEVIN ZEMBOWER
Thank you so much. You're absolutely right; when I put in: "Data =>'', " it worked perfectly. Now that I know the answer, I do note that in the MIME::Lite documentation, Data, FH and Path are the only parameters not marked "Optional." I wish they had made this more explicit, with a line like "Eit

Creating package containing Link lists

2002-03-27 Thread Naomi Arries
I have written a few linked list subroutines (See below) I want to move these subroutines in to a package Queue::LList 1) Queue must be a subdirectory containing file LList.pm 2) Need create and test package using the test calls(see code below) 3) Need to use the same variable names and package

Creating table for message board server tosave/delete/update messages

2002-03-27 Thread Bruce Ambraal
Hi All I need some one to comment on the program below With the code below I am trying to design a table that allows a simple message board server to: 1) Save a message, 2) delete a message, 3) update a message The password + username must be saved in the same table entry, and compare it when

Re: Maximum ,Minumum

2002-03-27 Thread Sudarsan Raghavan
"Jonathan E. Paton" wrote: > > > @data = (10,45,2,439); > > > ($min,$max) = (sort {$a <=> $b} @data)[0,$#data]; > > > > IMHO sorting a list to find the max and min > > element is not a good idea. The sort is of > > O(nlgn) and the usual run through the list > > to find the max element is O(n).

Creating a Linked list package

2002-03-27 Thread Naomi Arries
Hi Please asssist. I have construct a few Linklist subroutines see attached file. I want to move these subroutines in to a package Queue::LList 1) Queue must be a subdirectory containing file LList.pm 2) Want to create package and test it using the test calls in attached file. 3) Need to

Re: .csv file to .tab file?

2002-03-27 Thread Jenda Krynicky
From: Bud Rogers <[EMAIL PROTECTED]> > Brian Volk wrote: > > Is there a way to covert a .csv file to .tab file? > > I would do something like this. > > while (<>) { > @fields = split(/,/, $_); > $line = join("\t", @fields); > print $line; > } While this might work for

Re: Maximum ,Minumum

2002-03-27 Thread Jonathan E. Paton
> > @data = (10,45,2,439); > > ($min,$max) = (sort {$a <=> $b} @data)[0,$#data]; > > IMHO sorting a list to find the max and min > element is not a good idea. The sort is of > O(nlgn) and the usual run through the list > to find the max element is O(n). In general, it's not. > This is not of s

RE: Maximum ,Minumum

2002-03-27 Thread Robert Graham
I see what you mean I assume the following would be a better way of going at it $max = $min = $data[0]; foreach $val (@data) { $min = $val<$min ? $val:$min; $max = $val>$max ? $val:$max; } Robert -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of

Table for message board server to save/delete/update messages

2002-03-27 Thread Bruce Ambraal
Hi all Am I on the write track, else assist. boris this is where I'm at currently: Could you assist #!/usr/local/bin/perl use DBI; my $dbname = 'Bruce'; my $dbhostname = 'localhost'; my $user = 'root'; my $password = '' ; CREATE TABLE employee_Info ( primary_key INT AUTO_INCR

Re: Maximum ,Minumum

2002-03-27 Thread Sudarsan Raghavan
Robert Graham wrote: > Hi Ozgur > > You can use the following: > > @data = (10,45,2,439); > ($min,$max) = (sort {$a <=> $b} @data)[0,$#data]; IMHO sorting a list to find the max and min element is not a good idea. The sort is of O(nlgn) and the usual run through the list to find the max

Re: Help Required : Coding Standards

2002-03-27 Thread Jonathan E. Paton
> Just need to know any good docs/web links for Coding > Standards In PERL. Any pointers are welcome. Style Guide: perldoc perlstyle Writing portable code: perldoc perlport Documentation index: perldoc perl Jonathan Paton __ Do You Y

RE: Maximum ,Minumum

2002-03-27 Thread Robert Graham
Hi Ozgur You can use the following: @data = (10,45,2,439); ($min,$max) = (sort {$a <=> $b} @data)[0,$#data]; Regards Robert -Original Message- From: OZGUR GENC [mailto:[EMAIL PROTECTED]] Sent: 27 March 2002 13:06 To: [EMAIL PROTECTED] Subject: Maximum ,Minumum Hi All, Does anyone hel

  1   2   >