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 = /(.
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
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:
>
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
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
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
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
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
--
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
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
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
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
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]
> "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
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
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
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
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
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
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
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
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
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
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
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]
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
> > 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
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
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]
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
> -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
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
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:
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
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
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
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
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);
>
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
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
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...
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
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
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
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
"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
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]
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
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
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,
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 +
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
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
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
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,
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
--
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
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 (
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;
> "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
> "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
> "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
> "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
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
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
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
--
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
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
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] ==
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
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
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
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.
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
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
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
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, 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
How about trying something if you are going to go through a string..
grep //
Does anyone know how to search for a word?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
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]
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...
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
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
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
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
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]
> > > 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
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
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
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
"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).
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
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
> > @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
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
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
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
> 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
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 - 100 of 104 matches
Mail list logo