[29569] in Perl-Users-Digest
Perl-Users Digest, Issue: 813 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Aug 31 21:09:40 2007
Date: Fri, 31 Aug 2007 18:09:06 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Fri, 31 Aug 2007 Volume: 11 Number: 813
Today's topics:
Compare Dates <amerar@iwc.net>
Re: Compare Dates <noreply@gunnar.cc>
Re: Compare Dates <stoupa@practisoft.cz>
Re: Compare Dates <benkasminbullock@gmail.com>
Re: DBD::SQLite FreeBSD install <raherh@gmail.com>
Re: DBD::SQLite FreeBSD install brian.darkblueb@gmail.com
Re: DBD::SQLite FreeBSD install brian.darkblueb@gmail.com
Re: DBD::SQLite FreeBSD install brian.darkblueb@gmail.com
get memory percent usage info <KenPerl@gmail.com>
help regex and substitutions <john.swilting@wanadoo.fr>
Re: help regex and substitutions <jgibson@mail.arc.nasa.gov>
Re: help regex and substitutions <john.swilting@wanadoo.fr>
Re: help regex and substitutions <john.swilting@wanadoo.fr>
Re: help regex and substitutions <klaus03@gmail.com>
Re: help regex and substitutions <tadmc@seesig.invalid>
Re: Important Research Project <anno4000@radom.zrz.tu-berlin.de>
Re: Important Research Project <mecej4@operamail.com>
Re: Searching in a line <lerameur@yahoo.com>
Re: Searching in a line <benoit.lefebvre@gmail.com>
Re: Searching in a line <benoit.lefebvre@gmail.com>
Re: Searching in a line <jurgenex@hotmail.com>
Re: Searching in a line <jurgenex@hotmail.com>
Re: Solaris 10 gcc 3.4.6 perl compile error HELP! <the.evil.alien@gmail.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 31 Aug 2007 09:24:36 -0700
From: "amerar@iwc.net" <amerar@iwc.net>
Subject: Compare Dates
Message-Id: <1188577476.168795.115340@d55g2000hsg.googlegroups.com>
Hi All,
Here is a good one: I need to compare 2 dates, without the year.
Basically I want to know if a specific calendar date falls between two
other dates. Everything is in YYYY-MO-DD, the way Perl wants it.
So, say I am looking for a birthday. I do not care about the year, I
just want to know if a birthday falls between two dates in the
calendar.......
Any suggestions? Date::Manip??? Did not seem to do what I want.
Thanks!
------------------------------
Date: Fri, 31 Aug 2007 18:51:59 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Compare Dates
Message-Id: <5jqv9lFu2rcU1@mid.individual.net>
amerar@iwc.net wrote:
> Here is a good one: I need to compare 2 dates, without the year.
> Basically I want to know if a specific calendar date falls between two
> other dates. Everything is in YYYY-MO-DD, the way Perl wants it.
Just strip the year:
my $day = substr $date, 5;
and do stringwise comparisons.
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
------------------------------
Date: Sat, 1 Sep 2007 00:02:11 +0200
From: "Petr Vileta" <stoupa@practisoft.cz>
Subject: Re: Compare Dates
Message-Id: <fba3ab$1os6$1@ns.felk.cvut.cz>
amerar@iwc.net wrote:
> Hi All,
>
> Here is a good one: I need to compare 2 dates, without the year.
> Basically I want to know if a specific calendar date falls between two
> other dates. Everything is in YYYY-MO-DD, the way Perl wants it.
>
> So, say I am looking for a birthday. I do not care about the year, I
> just want to know if a birthday falls between two dates in the
> calendar.......
>
$birthdate = '1978-11-02';
$birthday = '11-02';
if(substr($birthdate,5) eq $birthday) {print "Bingo";}
--
Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your mail
from another non-spammer site please.)
------------------------------
Date: Sat, 1 Sep 2007 00:39:45 +0000 (UTC)
From: Ben Bullock <benkasminbullock@gmail.com>
Subject: Re: Compare Dates
Message-Id: <fbacch$soh$1@ml.accsnet.ne.jp>
On Fri, 31 Aug 2007 09:24:36 -0700, amerar@iwc.net wrote:
> Here is a good one: I need to compare 2 dates, without the year.
> Basically I want to know if a specific calendar date falls between two
> other dates. Everything is in YYYY-MO-DD, the way Perl wants it.
>
> So, say I am looking for a birthday. I do not care about the year, I
> just want to know if a birthday falls between two dates in the
> calendar.......
>
> Any suggestions? Date::Manip??? Did not seem to do what I want.
Change the year of all your dates to be the same arbitrary year (make it a
leap year), then use the Day_of_Year function from
Date::Calc to get the day of the year (see
http://www.unix.org.ua/orelly/perl/cookbook/ch03_07.htm), then compare the
numbers.
------------------------------
Date: Fri, 31 Aug 2007 18:04:46 +0000
From: rahed <raherh@gmail.com>
Subject: Re: DBD::SQLite FreeBSD install
Message-Id: <uy7frd1hd.fsf@gmail.com>
brian.darkblueb@gmail.com writes:
> works, but the tests fail because "Cant load xxx/SQLite.so - Undefined
> symbol pthread_create".
Did you try force install? Usually not recommended but I did it several
times to install DBD::SQLite and it has worked without issues.
--
Radek
------------------------------
Date: Fri, 31 Aug 2007 13:58:18 -0700
From: brian.darkblueb@gmail.com
Subject: Re: DBD::SQLite FreeBSD install
Message-Id: <1188593898.378424.154870@l22g2000prc.googlegroups.com>
On Aug 31, 11:04 am, rahed <rah...@gmail.com> wrote:
> brian.darkbl...@gmail.com writes:
> > works, but the tests fail because "Cant load xxx/SQLite.so - Undefined
> > symbol pthread_create".
>
> Did you try force install? Usually not recommended but I did it several
> times to install DBD::SQLite and it has worked without issues.
>
well, force install made the Module show up as 'installed', but
actually running it gets the same error..
/libexec/ld-elf.so.1: /usr/local/lib/libsqlite3.so.8: Undefined symbol
"pthread_create"
------------------------------
Date: Fri, 31 Aug 2007 15:21:35 -0700
From: brian.darkblueb@gmail.com
Subject: Re: DBD::SQLite FreeBSD install
Message-Id: <1188598895.689490.239270@z24g2000prh.googlegroups.com>
On Aug 31, 1:58 pm, brian.darkbl...@gmail.com wrote:
> On Aug 31, 11:04 am, rahed <rah...@gmail.com> wrote:
>
> > brian.darkbl...@gmail.com writes:
> > > works, but the tests fail because "Cant load xxx/SQLite.so - Undefined
> > > symbol pthread_create".
>
> > Did you try force install? Usually not recommended but I did it several
> > times to install DBD::SQLite and it has worked without issues.
>
> well, force install made the Module show up as 'installed', but
> actually running it gets the same error..
>
> /libexec/ld-elf.so.1: /usr/local/lib/libsqlite3.so.8: Undefined symbol
> "pthread_create"
I hand edited the Makefile. added -pthread to CCFLAGS, added -lpthread
to both EXTRALIBS and LDLOADLIBS
now it works...
------------------------------
Date: Fri, 31 Aug 2007 16:03:00 -0700
From: brian.darkblueb@gmail.com
Subject: Re: DBD::SQLite FreeBSD install
Message-Id: <1188601380.370211.308110@z24g2000prh.googlegroups.com>
On Aug 31, 3:21 pm, brian.darkbl...@gmail.com wrote:
> On Aug 31, 1:58 pm, brian.darkbl...@gmail.com wrote:
>
> > On Aug 31, 11:04 am, rahed <rah...@gmail.com> wrote:
>
> > > brian.darkbl...@gmail.com writes:
> > > > works, but the tests fail because "Cant load xxx/SQLite.so - Undefined
> > > > symbol pthread_create".
>
> > > Did you try force install? Usually not recommended but I did it several
> > > times to install DBD::SQLite and it has worked without issues.
>
> > well, force install made the Module show up as 'installed', but
> > actually running it gets the same error..
>
> > /libexec/ld-elf.so.1: /usr/local/lib/libsqlite3.so.8: Undefined symbol
> > "pthread_create"
>
> I hand edited the Makefile. added -pthread to CCFLAGS, added -lpthread
> to both EXTRALIBS and LDLOADLIBS
>
> now it works...
well, I *think* it works.. the tests run, except one file will fail,
in the middle, in three test runs it has been the same one twice and
another the third time. I ran a sample program that I wrote myself..
pretty sure it should work unmodified, but ...
now trying another example.. got "out of memory" at an odd place..
weird
is this really that screwy?
------------------------------
Date: Fri, 31 Aug 2007 18:09:09 -0000
From: Ken <KenPerl@gmail.com>
Subject: get memory percent usage info
Message-Id: <1188583749.356296.144150@l22g2000prc.googlegroups.com>
hi,
how to get a Perl program memory percent usage information within the
program itself, so that I can write that info to the stand out?
------------------------------
Date: Fri, 31 Aug 2007 18:05:51 +0200
From: john swilting <john.swilting@wanadoo.fr>
Subject: help regex and substitutions
Message-Id: <46d83c60$0$27378$ba4acef3@news.orange.fr>
I recopied the chaphitre 5
#!/usr/bin/perl -w
use strict;
use diagnostics;
my @conf = ('XferMethod',
'rsync',
'XferLogLevel',
'1',
'RSyncShare',
'___1___',##they is these 2 pattern
'ClientNameAlias',
'___2___');##they is pattern
print @conf,"\n";
my @substitution = @conf;
my $motif =qr/___[1-9][0-9]?___/is;
my @regexes = ();
my @motif = ();
foreach $motif ( @motif ) {
push @regexes, qr/$motif/;
}
foreach my $elem ( @substitution ) {
foreach my $re ( @regexes ) {##the loop however turns well#scalar(@regexes
if ( $elem =~ /$re/) {##one do not arrive to this line
print "$elem egal $re\nentrer la valeur\n";
chop ($elem =<STDIN>);
print "nouvelle valeur de",$elem,"\n";
}
}
}
------------------------------
Date: Fri, 31 Aug 2007 09:27:38 -0700
From: Jim Gibson <jgibson@mail.arc.nasa.gov>
Subject: Re: help regex and substitutions
Message-Id: <310820070927384577%jgibson@mail.arc.nasa.gov>
In article <46d83c60$0$27378$ba4acef3@news.orange.fr>, john swilting
<john.swilting@wanadoo.fr> wrote:
> I recopied the chaphitre 5
In what book?
> #!/usr/bin/perl -w
use warnings; # preferred these days
>
> use strict;
> use diagnostics;
>
> my @conf = ('XferMethod',
> 'rsync',
> 'XferLogLevel',
> '1',
> 'RSyncShare',
> '___1___',##they is these 2 pattern
> 'ClientNameAlias',
> '___2___');##they is pattern
>
>
> print @conf,"\n";
> my @substitution = @conf;
> my $motif =qr/___[1-9][0-9]?___/is;
> my @regexes = ();
> my @motif = ();
The array @motif is empty.
> foreach $motif ( @motif ) {
> push @regexes, qr/$motif/;
> }
You are iterating over the empty array @motif, assigning each value
therein to the variable $motif. At the end of this loop, since @motif
has no values, the array @regexes will also be empty.
Perhaps you want, instead of the loop, the following:
push( @regexes, $motif );
>
> foreach my $elem ( @substitution ) {
> foreach my $re ( @regexes ) {##the loop however turns well#scalar(@regexes
> if ( $elem =~ /$re/) {##one do not arrive to this line
> print "$elem egal $re\nentrer la valeur\n";
> chop ($elem =<STDIN>);
> print "nouvelle valeur de",$elem,"\n";
> }
> }
> }
>
The inner statements of the loop on @regexes will never be executed,
because @regexes has no values.
--
Jim Gibson
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
------------------------------
Date: Fri, 31 Aug 2007 19:02:03 +0200
From: john swilting <john.swilting@wanadoo.fr>
Subject: Re: help regex and substitutions
Message-Id: <46d8498b$0$27405$ba4acef3@news.orange.fr>
Jim Gibson wrote:
> In article <46d83c60$0$27378$ba4acef3@news.orange.fr>, john swilting
> <john.swilting@wanadoo.fr> wrote:
>
>> I recopied the chaphitre 5
>
> In what book?
>
>> #!/usr/bin/perl -w
>
> use warnings; # preferred these days
>
>>
>> use strict;
>> use diagnostics;
>>
>> my @conf = ('XferMethod',
>> 'rsync',
>> 'XferLogLevel',
>> '1',
>> 'RSyncShare',
>> '___1___',##they is these 2 pattern
>> 'ClientNameAlias',
>> '___2___');##they is pattern
>>
>>
>> print @conf,"\n";
>> my @substitution = @conf;
>> my $motif =qr/___[1-9][0-9]?___/is;
>> my @regexes = ();
>> my @motif = ();
>
> The array @motif is empty.
>
>> foreach $motif ( @motif ) {
>> push @regexes, qr/$motif/;
>> }
>
> You are iterating over the empty array @motif, assigning each value
> therein to the variable $motif. At the end of this loop, since @motif
> has no values, the array @regexes will also be empty.
>
> Perhaps you want, instead of the loop, the following:
>
> push( @regexes, $motif );
>
>>
>> foreach my $elem ( @substitution ) {
>> foreach my $re ( @regexes ) {##the loop however turns
>> well#scalar(@regexes
>> if ( $elem =~ /$re/) {##one do not arrive to this line
>> print "$elem egal $re\nentrer la valeur\n";
>> chop ($elem =<STDIN>);
>> print "nouvelle valeur de",$elem,"\n";
>> }
>> }
>> }
>>
>
> The inner statements of the loop on @regexes will never be executed,
> because @regexes has no values.
>
the book is programmation en perl 3eme edition
with the push (@regexes,$motif)
the substitution is well
how to make to improve my code... I look at closely the precis examples
handbook O reilly
------------------------------
Date: Fri, 31 Aug 2007 19:15:42 +0200
From: john swilting <john.swilting@wanadoo.fr>
Subject: Re: help regex and substitutions
Message-Id: <46d84cbe$0$27381$ba4acef3@news.orange.fr>
john swilting wrote:
> Jim Gibson wrote:
>
>> In article <46d83c60$0$27378$ba4acef3@news.orange.fr>, john swilting
>> <john.swilting@wanadoo.fr> wrote:
>>
>>> I recopied the chaphitre 5
>>
>> In what book?
> the book is programmation en perl 3eme edition
> with the push (@regexes,$motif)
> the substitution is well
>
> how to make to improve my code... I look at closely the precis examples
> handbook O reilly
#!/usr/bin/perl -w
use strict;
use diagnostics;
use warnings;
my @conf = ('XferMethod',
'rsync',
'XferLogLevel',
'1',
'RSyncShare',
'___1___',
'ClientNameAlias',
'___2___');
print @conf,"\n";
my @substitution = @conf;
my $motif =qr/(___[1-9][0-9]?___)/is;
my @regexes = ();
##my @motif = ();
##foreach $motif ( @motif ) {
## push (@regexes,qr/$motif/);
## }
push (@regexes,$motif);
foreach my $elem ( @substitution ) {
foreach my $re ( @regexes ) {
if ( $elem =~ /$re/) {
print "$elem egal $re\nentrer la valeur\n";
chop ($elem =<STDIN>);
print "nouvelle valeur de",$elem,"\n";
}
}
}
how to do improves my code
------------------------------
Date: Fri, 31 Aug 2007 11:20:32 -0700
From: Klaus <klaus03@gmail.com>
Subject: Re: help regex and substitutions
Message-Id: <1188584432.023772.154360@y42g2000hsy.googlegroups.com>
On Aug 31, 7:15 pm, john swilting <john.swilt...@wanadoo.fr> wrote:
> how to make to improve my code...
>
> #!/usr/bin/perl -w
>
> use strict;
> use diagnostics;
If you can afford, get rid of the "use diagnostics" to improve
execution speed.
> use warnings;
>
> my @conf = ('XferMethod',
> 'rsync',
> 'XferLogLevel',
> '1',
> 'RSyncShare',
> '___1___',
> 'ClientNameAlias',
> '___2___');
>
> print @conf,"\n";
> my @substitution = @conf;
> my $motif =qr/(___[1-9][0-9]?___)/is;
> my @regexes = ();
> ##my @motif = ();
> ##foreach $motif ( @motif ) {
> ## push (@regexes,qr/$motif/);
> ## }
You could remove the commented out code altogether from your program,
it is confusing.
> push (@regexes,$motif);
> foreach my $elem ( @substitution ) {
> foreach my $re ( @regexes ) {
> if ( $elem =~ /$re/) {
> print "$elem egal $re\nentrer la valeur\n";
> chop ($elem =<STDIN>);
You could use chomp instead of chomp.
perldoc -f chomp
This safer version of chop removes any trailing string that
corresponds to the current value of $/
> print "nouvelle valeur de",$elem,"\n";
> }
> }
> }
------------------------------
Date: Fri, 31 Aug 2007 16:48:34 -0500
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: help regex and substitutions
Message-Id: <slrnfdh35i.56a.tadmc@tadmc30.sbcglobal.net>
john swilting <john.swilting@wanadoo.fr> wrote:
> my $motif =qr/___[1-9][0-9]?___/is;
That is equivalent to:
my $motif =qr/___[1-9][0-9]?___/;
Both of the modifiers are no-ops. They do nothing.
m//i ignores case. Where can your pattern match letters so that
their case can be ignored? Nowhere.
m//s makes dot in your pattern match a newline. Where is the dot in
your pattern that is being modified?
You should not use a modifier unless you know what that modifier does,
and why it is needed in your regex.
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
------------------------------
Date: Fri, 31 Aug 2007 17:49:23 +0200
From: Anno Siegel <anno4000@radom.zrz.tu-berlin.de>
Subject: Re: Important Research Project
Message-Id: <5jqrk2Fss3hU1@mid.dfncis.de>
On 2007-08-31 16:58:53 +0200, bugbear <bugbear@trim_papermule.co.uk_trim> said:
> E.D.G. wrote:
>> "dave_w" <dave.willmer@gmail.com> wrote in message
>> news:1188500139.411988.127100@q5g2000prf.googlegroups.com...
>>
>> My main Perl program is presently about 3500 lines of code long and 160 KB
>> in size. So I am not too anxious to translate it into another language.
>
> That's not terribly big, you know.
>
> Tell you what - do some legwork, find a relevant forum,
> and post your ACTUAL requirment, instead of deciding
> you already know the solution.
>
> At the moment, you're being amazingly cryptic
> about the problem you're trying to solve,
> which has made some people (including me)
> suspicious.
if "E.D.G." <edgrsprj@ix.netcom.com> hasn't changed course, it is about
earthquake prediction. The method is alledgedly superior to whatever the state
of the art is these days. E.D.G makes regular reappearences (with
years in between).
Not worth much consideration.
Anno
------------------------------
Date: Fri, 31 Aug 2007 18:54:36 -0500
From: mecej4 <mecej4@operamail.com>
Subject: Re: Important Research Project
Message-Id: <46d8aa3d$0$15387$4c368faf@roadrunner.com>
Anno Siegel wrote:
> On 2007-08-31 16:58:53 +0200, bugbear
> <bugbear@trim_papermule.co.uk_trim> said:
>
>> E.D.G. wrote:
>>> "dave_w" <dave.willmer@gmail.com> wrote in message
>>> news:1188500139.411988.127100@q5g2000prf.googlegroups.com...
>>>
>>> My main Perl program is presently about 3500 lines of code long and
>>> 160 KB
>>> in size. So I am not too anxious to translate it into another language.
>>
>> That's not terribly big, you know.
>>
>> Tell you what - do some legwork, find a relevant forum,
>> and post your ACTUAL requirment, instead of deciding
>> you already know the solution.
>>
>> At the moment, you're being amazingly cryptic
>> about the problem you're trying to solve,
>> which has made some people (including me)
>> suspicious.
>
> if "E.D.G." <edgrsprj@ix.netcom.com> hasn't changed course, it is about
> earthquake prediction. The method is alledgedly superior to whatever
> the state
> of the art is these days. E.D.G makes regular reappearences (with years
> in between).
> Not worth much consideration.
>
> Anno
>
If another of his projects is any indication, the mysterious E.D.G. is
so far ahead of most people that it would be futile to try to help:
http://www.knowledge-database.org/grp/sci_-psychology_-research_l18.html
-- mecej4
------------------------------
Date: Fri, 31 Aug 2007 12:06:11 -0700
From: lerameur <lerameur@yahoo.com>
Subject: Re: Searching in a line
Message-Id: <1188587171.640478.88290@19g2000hsx.googlegroups.com>
On Aug 30, 8:15 pm, "J=FCrgen Exner" <jurge...@hotmail.com> wrote:
> lerameur wrote:
> > On Aug 30, 4:57 pm, "J=FCrgen Exner" <jurge...@hotmail.com> wrote:
> >> lerameur wrote:
> >>> On Aug 30, 4:39 pm, "J=FCrgen Exner" <jurge...@hotmail.com> wrote:
> >>>> lerameur wrote:
> >>>>> while ($data=3D<$fh>) {
>
> >>>> Here you are reading each line into $data
>
> >>>>> if (/beth/) { #matches only if beth is in line
>
> >>>> and here you are matching /beth/ against the default $_.
>
> >> No. I am saying you should make up your mind if you want to use the
> >> default $_ or your own $data. Either is ok, but not both.
>
> > I do not make difference between the two. This is new to me.
>
> Oh come on! Do you really expect if you are setting one variable named $d=
ata
> another totally unrelated variable named $_ would magically assume the sa=
me
> value? How long have you been programming?
Well, I just graduated from school so not that long, I mostly
programmed microcontrollers
> > I guess I will sue the default one.
>
> Ok, then don't assign the read line to $data:
>
> while (<$fh>) {
Its working great now. thanks
------------------------------
Date: Fri, 31 Aug 2007 13:16:52 -0700
From: Benoit Lefebvre <benoit.lefebvre@gmail.com>
Subject: Re: Searching in a line
Message-Id: <1188591412.336401.196540@o80g2000hse.googlegroups.com>
Here is how I'd do it..
#!/usr/bin/perl
@list = `cat file.txt | grep beth`;
foreach $line (@list) {
@items = split(",",$line);
print $items[3] . "\n";
}
------------------------------
Date: Fri, 31 Aug 2007 13:18:48 -0700
From: Benoit Lefebvre <benoit.lefebvre@gmail.com>
Subject: Re: Searching in a line
Message-Id: <1188591528.968361.148670@g4g2000hsf.googlegroups.com>
Can also be made like that (if you don't want to use the shell
functions)
#!/usr/bin/perl -w
open (FILE,"<file.txt");
foreach $line (<FILE>) {
if ($line =~ m/beth/) {
@items = split(",",$line);
print $items[3] . "\n";
}
}
close (FILE);
------------------------------
Date: Sat, 01 Sep 2007 00:30:53 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Searching in a line
Message-Id: <1p2Ci.237$es2.170@trndny09>
Benoit Lefebvre wrote:
> Here is how I'd do it..
>
> #!/usr/bin/perl
> @list = `cat file.txt | grep beth`;
Useless use of cat
Useless use of dumb external process for grep (Perl has it's own grep; but
even worse it is not even needed in this case)
Waste of memory (no need to create large array when you can process each
line individually)
> foreach $line (@list) {
> @items = split(",",$line);
> print $items[3] . "\n";
> }
------------------------------
Date: Sat, 01 Sep 2007 00:31:46 GMT
From: "Jürgen Exner" <jurgenex@hotmail.com>
Subject: Re: Searching in a line
Message-Id: <Sp2Ci.655$pm2.601@trndny08>
Benoit Lefebvre wrote:
> Can also be made like that (if you don't want to use the shell
> functions)
>
> #!/usr/bin/perl -w
>
> open (FILE,"<file.txt");
>
> foreach $line (<FILE>) {
> if ($line =~ m/beth/) {
> @items = split(",",$line);
> print $items[3] . "\n";
Much better.
jue
------------------------------
Date: Fri, 31 Aug 2007 09:04:58 -0700
From: mancat <the.evil.alien@gmail.com>
Subject: Re: Solaris 10 gcc 3.4.6 perl compile error HELP!
Message-Id: <1188576298.243844.40210@d55g2000hsg.googlegroups.com>
On Aug 31, 3:06 am, jrpfinch <jrpfi...@gmail.com> wrote:
> Try:
>
> ln -s /usr/lib/libdb.so.1 /usr/lib/libdb.so
>
> Then recompile.
>
> Let me know if that works - if so, it's the first time I've answered
> rather than asked a question on this group and I will have a warm glow
> in my heart.
This worked thanks
-mancat
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V11 Issue 813
**************************************