Re: cpan message

2006-03-09 Thread Xavier Noria
On Mar 9, 2006, at 8:45, Owen wrote: This message pops up when a new CPAN.pm is available There's a new CPAN.pm version (v1.87) available! [Current version is v1.83] You might want to try install Bundle::CPAN reload cpan without quitting the current session. It should be a seamle

Re: counting scalar array elements question

2006-03-09 Thread Hans Meier (John Doe)
John W. Krahn am Donnerstag, 9. März 2006 03.36: > Hans Meier (John Doe) wrote: [...] > > my @array; > > #or: > > my @array=(); [v--- this sidenote is wrong] > > (sidenote: the second form must be used in contexts where the code is > > persistent/preloaded and used several times, to ensure that @

Does this script have the efficiency problems?

2006-03-09 Thread Practical Perl
Hello, I have a script,which run well at most time.This day I use it to analyse the files of 1.7G,it become very slow and can't get executed continuely anymore.When I run 'strace -p ' (here is this script's PID),there is no output,it seems died. Here is my script: #!/usr/bin/perl use st

frameworks

2006-03-09 Thread Octavian Rasnita
Hi, Do you know if there is a comparison among more content management systems or frameworks like Bricolage or Catalyst that can help deciding the most apropriate one for developing a certain web site? Thanks. Teddy -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

Re: Does this script have the efficiency problems?

2006-03-09 Thread Chris Devers
On Thu, 9 Mar 2006, Practical Perl wrote: > Here is my script: > > #!/usr/bin/perl > use strict; > use warnings; > > my $date=`date +%y%m%d`; > chomp $date; ^^^ Not that this is your problem, but why on earth are you shelling out for the date? Perl can do this just fine, you know, and you don

how to translate time string

2006-03-09 Thread Jeff Pang
Hello,list, Maybe it's a simple problem,but I don't know how to do it. I have a time string,for example: Thu Mar 9 23:04:03 2006 How can I get it translated to unix timestamp,for example: 1141916656 Thanks. -- Jeff Pang NetEase AntiSpam Team http://corp.netease.com -- To unsubscribe, e-mai

Re: Does this script have the efficiency problems?

2006-03-09 Thread Hans Meier (John Doe)
Practical Perl am Donnerstag, 9. März 2006 09.50: > Hello, > > I have a script,which run well at most time.This day I use it to analyse > the files of 1.7G,it become very slow and can't get executed continuely > anymore.When I run 'strace -p ' (here is this script's PID),there > is no outp

Re: Does this script have the efficiency problems?

2006-03-09 Thread Shawn Corey
Chris Devers wrote: On Thu, 9 Mar 2006, Practical Perl wrote: Here is my script: #!/usr/bin/perl use strict; use warnings; my $date=`date +%y%m%d`; chomp $date; ^^^ Not that this is your problem, but why on earth are you shelling out for the date? Perl can do this just fine, you know, and

Re: how to translate time string

2006-03-09 Thread Shawn Corey
Jeff Pang wrote: Hello,list, Maybe it's a simple problem,but I don't know how to do it. I have a time string,for example: Thu Mar 9 23:04:03 2006 How can I get it translated to unix timestamp,for example: 1141916656 Thanks. -- Jeff Pang NetEase AntiSpam Team http://corp.netease.com POSI

pushing csv vaules into hash

2006-03-09 Thread Curt Shaffer
I am really stuck here. I need to split values from a csv value and push them into an array, then perform a routine for all of them in a foreach statement. In this example I am reading an email address, a username and a password and needing to send each user listed in the csv a mail to the email ad

RE: pushing csv vaules into hash

2006-03-09 Thread Ryan Frantz
> -Original Message- > From: Curt Shaffer [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 09, 2006 10:36 AM > To: beginners@perl.org > Subject: pushing csv vaules into hash > > I am really stuck here. I need to split values from a csv value and push > them into an array, then perform a

Re: pushing csv vaules into hash

2006-03-09 Thread Shawn Corey
Curt Shaffer wrote: I am really stuck here. I need to split values from a csv value and push them into an array, then perform a routine for all of them in a foreach statement. In this example I am reading an email address, a username and a password and needing to send each user listed in the csv

Re: Does this script have the efficiency problems?

2006-03-09 Thread Randal L. Schwartz
> "Chris" == Chris Devers <[EMAIL PROTECTED]> writes: Chris> Not that this is your problem, but why on earth are you shelling out Chris> for the date? Perl can do this just fine, you know, and you don't even Chris> have to chomp() the result :-) yes, the irony of picking "practical perl" as y

Strange problem assigning values to strings

2006-03-09 Thread Bisbal, Prentice
I've got a strange problem. This perl code has been in use for a long time (6 - 12 mos, at least), and it just started behaving badly the other day. This code: foreach $num (@ids) { $infile = "$tmpdir/lp-$num.mol"; $outfile = "$original_dir/lp-$num.$type"; print "infile

Re: Strange problem assigning values to strings

2006-03-09 Thread Shawn Corey
Bisbal, Prentice wrote: I've got a strange problem. This perl code has been in use for a long time (6 - 12 mos, at least), and it just started behaving badly the other day. This code: foreach $num (@ids) { $infile = "$tmpdir/lp-$num.mol"; $outfile = "$original_dir/lp-$num.$typ

Re: Strange problem assigning values to strings

2006-03-09 Thread Shawn Corey
Bisbal, Prentice wrote: I think you're on to something. This is what the debugger shows: DB<17> x [EMAIL PROTECTED] 0 ARRAY(0x90c420c) 0 "706840\cM" 1 "706846\cM" 2 "715596\cM" 3 "715620\cM" 4 "722292\cM" 5 "722300\cM" 6 "722327\cM" 7 "722330\cM" 8 "722340\c

Re: how to translate time string

2006-03-09 Thread Tom Phoenix
On 3/9/06, Jeff Pang <[EMAIL PROTECTED]> wrote: > I have a time string,for example: > Thu Mar 9 23:04:03 2006 > > How can I get it translated to unix timestamp,for example: > 1141916656 Have you looked on CPAN? http://search.cpan.org/search?query=time&mode=all Hope this helps! --Tom Phoeni

Does anyone have "coconet.dat"?

2006-03-09 Thread Adam W
Hello All, I'm going through Schwartz's _Learning Perl Objects, References, and Modules_. One of the exercises at the end of chapter 5 (I think), requires a file called "coconet.dat" which is just a bunch of made up data to practice autovivification, anonymous referencing, etc. The file is

Re: Does anyone have "coconet.dat"?

2006-03-09 Thread Tom Phoenix
On 3/9/06, Adam W <[EMAIL PROTECTED]> wrote: > I'm going through Schwartz's _Learning Perl Objects, References, and > Modules_. One of the exercises at the end of chapter 5 (I think), > requires a file called "coconet.dat" which is just a bunch of made up > data to practice autovivification, anon

RE: frameworks

2006-03-09 Thread Timothy Johnson
I've always liked the product called "This is a Perl Mailing List". -Original Message- From: Octavian Rasnita [mailto:[EMAIL PROTECTED] Sent: Thursday, March 09, 2006 5:14 AM To: Beginner Perl Subject: frameworks Hi, Do you know if there is a comparison among more content managemen

Re: Parallel Port and Console Application

2006-03-09 Thread Tom Phoenix
On 3/8/06, LinuxMurah. com <[EMAIL PROTECTED]> wrote: > I'm a beginner in PERL. After Python confusing me about installing > Parallel Port module, I decide to try Perl and hopefuly I have a > future with Perl. So I already download Parallel Port module > (http://search.cpan.org/CPAN/authors/id/S/S

RE: Strange problem assigning values to strings

2006-03-09 Thread Bisbal, Prentice
Thanks for the tip. That fixed it. Prentice -Original Message- From: Shawn Corey [mailto:[EMAIL PROTECTED] Sent: Thu 3/9/2006 12:27 PM To: Bisbal, Prentice; beginners@perl.org Subject: Re: Strange problem assigning values to strings Bisbal, Prentice wrote: > I think you're on to some

Re: how to translate time string

2006-03-09 Thread Chris Charley
- Original Message - From: "Jeff Pang" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: Sent: Thursday, March 09, 2006 10:09 AM Subject: how to translate time string Hello,list, Maybe it's a simple problem,but I don't know how to do it. I have a time string,for example: Thu Mar

Grep frustration

2006-03-09 Thread Brian Poellnitz
OK here goes... The sample data below is read into a list, @dir_files. What I'd like to do is grep() the list so that I'm left with only files that end in ".wav" and contain certain string. The "certain string" is where I run into problems. Something like grep(/.*\.wav/) works fine for ge

RE: Grep frustration

2006-03-09 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Brian Poellnitz wrote: > OK here goes... > > The sample data below is read into a list, @dir_files. What I'd like > to do is grep() the list so that I'm left with only files that end in > ".wav" and contain certain string. The "certain string" is where I > run into problems. Something like >

Re: Grep frustration

2006-03-09 Thread Tom Phoenix
On 3/9/06, Brian Poellnitz <[EMAIL PROTECTED]> wrote: > The sample data below is read into a list, @dir_files. What I'd like to do > is grep() the list so that I'm left with only files that end in ".wav" and > contain > certain string. The "certain string" is where I run into problems. Somethi

Re: Grep frustration

2006-03-09 Thread Brian McKee
On 09/03/06, Tom Phoenix <[EMAIL PROTECTED]> wrote: > Although it's tempting to use a pattern match for this, that's not the > right tool for the job. To see whether a string contains a given > substring, check whether the return value of index() is not -1. Can you expand on that thought? What is

Re: Grep frustration

2006-03-09 Thread Tom Phoenix
On 3/9/06, Brian McKee <[EMAIL PROTECTED]> wrote: > What is a pattern match good for if it isn't for finding a substring > in a string? That's a fair question. A pattern match finds a match for a pattern, not a substring. Patterns can have metacharacters, they can be case-insensitive, they can be

Re: Grep frustration

2006-03-09 Thread John W. Krahn
Brian Poellnitz wrote: > > The sample data below is read into a list, @dir_files. What I'd like > to do is grep() the list so that I'm left with only files that end in > ".wav" and contain certain string. The "certain string" is where I > run into problems. Something like > > grep(/.*\.wav/) >

Clearing tables...

2006-03-09 Thread Sky Blueshoes
What is the sequel statement to clear an entire table using DBI? SkyBlueshoes -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Clearing tables...

2006-03-09 Thread Timothy Johnson
Usually you'll want to do something like this: my $sth = $dbh->prepare("DELETE FROM TABLE1"); $sth->execute(); Is that what you meant? It will delete all records. -Original Message- From: Sky Blueshoes [mailto:[EMAIL PROTECTED] Sent: Thursday, March 09, 2006 4:46 PM

Re: Clearing tables...

2006-03-09 Thread JupiterHost.Net
Sky Blueshoes wrote: What is the sequel statement to clear an entire table using DBI? a) you mean "Ess Queue Ell" nor "sequel" b) it depends on the database your using, but generally it will be a DELETE FROM table or DROP TABLE table type statement. See your DB vendor's documentation fro s

Re: Clearing tables...

2006-03-09 Thread Bob Showalter
Sky Blueshoes wrote: > What is the sequel statement to clear an entire table using DBI? It depends on your database, but typically: $dbh->do('delete from some_table'); Some databases support TRUNCATE: $dbh->do('truncate some_table'); -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addit

Re: how to translate time string

2006-03-09 Thread Jeff Pang
> >How about Time::Local? > >#!/usr/bin/perl >use strict; >use warnings; >use Time::Local; > >my %month; >@month{ qw/Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec/ } = 0..11; > >my $date = "Thu Mar 9 23:04:03 2006"; > >my (undef, $month, $day, $h, $m, $s, $year) = split /\W+/, $date; > >my $tim

Re: pushing csv vaules into hash

2006-03-09 Thread Michael David
- Original Message - From: "Curt Shaffer" <[EMAIL PROTECTED]> To: Sent: Friday, March 10, 2006 2:36 AM Subject: pushing csv vaules into hash I am really stuck here. I need to split values from a csv value and push them into an array, then perform a routine for all of them in a forea

how to rewind file?

2006-03-09 Thread zhao_bingfeng
After I use <> operator on s file handle, I need read it from head again. I found these is no rewind function, must I close it and open again?   ---Life is a different teacher... It doesn't teach lessons, and then keep exams... It keeps the exams

Re: how to rewind file?

2006-03-09 Thread Tom Phoenix
On 3/9/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > After I use <> operator on s file handle, I need read it from head again. I > found these is no rewind function, must I close it and open again? I'm pretty sure you're looking for the seek() function, which moves the access position to a g

Re: how to rewind file?

2006-03-09 Thread Ryan Gies
See the function seek (given a file handle) seek($handle,0,0); [EMAIL PROTECTED] wrote: > After I use <> operator on s file handle, I need read it from head again. I > found these is no rewind function, must I close it and open again? > > > --- > Li

Re: how to rewind file?

2006-03-09 Thread John W. Krahn
[EMAIL PROTECTED] wrote: > After I use <> operator on s file handle, I need read it from head again. I > found these is no rewind function, must I close it and open again? That depends. If <> is reading from '-' (STDIN) then there is no "file" to rewind. If @ARGV contains multiple file names the

答复: how to rewind file?

2006-03-09 Thread zhao_bingfeng
That's great, I also found doc about this function, thank you, Tom and Ryan > -邮件原件- > 发件人: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 代表 > Tom Phoenix > 发送时间: 2006年3月10日 12:21 > 收件人: [EMAIL PROTECTED] > 抄送: beginners@perl.org > 主题: Re: how to rewind file? > > On 3/9/06, [EMAIL PROTEC

Re: Does anyone have "coconet.dat"?

2006-03-09 Thread Chas Owens
On 3/9/06, Adam W <[EMAIL PROTECTED]> wrote: > Hello All, > > I'm going through Schwartz's _Learning Perl Objects, References, and > Modules_. One of the exercises at the end of chapter 5 (I think), > requires a file called "coconet.dat" which is just a bunch of made up > data to practice autovivi

Help me out....

2006-03-09 Thread Rakesh Mishra
Hi all I feel akward to ask this question, I know this is not the right place to ask this question. well I have to prepare for the tech. interview for the post of Perl Programmer (first time). I have tried google but not usefull, so any of you can sugest tips, questions or any thing that helps. T

Forcing order

2006-03-09 Thread Ron Smith
Hi all, I need a little insight on the following code, as I learn the CGI module. What's happening is, as the output to web page increases, with the number of entries, the order in which values are entered rearranges itself, when printing to the page. How can I assure printing the correct order?

Re: Forcing order

2006-03-09 Thread Chris Devers
On Thu, 9 Mar 2006, Ron Smith wrote: > How can I assure printing the correct order? You can't guarantee the order of keys in a hash per se. For efficiency and optimization, hashes are stored in a random order, unlike arrays, which do have a straightforward order. The trick then is to sort the

I found perlcc(distributed with ActiveState Perl) is useless mostly :(

2006-03-09 Thread zhao_bingfeng
I wrote some perl programs and want to use perlcc compiles them to .exe files, I get easily crashed results after long time wait. I feel if I use a little complex data structures, such as hash of array, it will get in problems; of source, little script such as "hello world" is OK. I don't kn

Re: how to rewind file?

2006-03-09 Thread nishanth ev
You can use sysseek function. For more info use perldoc perlfunc or the following link http://perldoc.perl.org/functions/sysseek.html Regards Nishanth --- [EMAIL PROTECTED] wrote: > After I use <> operator on s file handle, I need > read it from head again. I > found these is no rewind funct

RE: I found perlcc(distributed with ActiveState Perl) is useless mostly :(

2006-03-09 Thread Thomas Bätzler
smime.p7m Description: S/MIME encrypted message

Re: Help me out....

2006-03-09 Thread Xavier Noria
On Mar 10, 2006, at 6:49, Rakesh Mishra wrote: I feel akward to ask this question, I know this is not the right place to ask this question. well I have to prepare for the tech. interview for the post of Perl Programmer (first time). I have tried google but not usefull, so any of you can sugest

parenthesis after a method

2006-03-09 Thread Ken Perl
I want to put some methods in a POD file synopsis section, which one is correct if a method without a passing in parameter. =head2 generate This function generates a global unique id. or =head2 generate() This function generates a global unique id. any rules? -- perl -e 'print unpack(u,"62V5