Re: Looking for good Perl projects

2005-12-19 Thread Todd W
"Zentara" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Fri, 16 Dec 2005 18:40:50 -0800, [EMAIL PROTECTED] (Just Another) > wrote: > > > > >I want to learn Perl. I believe doing a project is the best way to learn it. > >It gives me motivation to find out more about the language

Re: Reading the built-in number variables

2005-12-19 Thread John W. Krahn
[EMAIL PROTECTED] wrote: > The issue: > > I have a routine which builds a regex and 'knows' which paren matches to use > afterwords. For instance after a line such as: > > use strict; > my $data =~ m/^(\S+)\s+((\S+\s+)?(\S+))$/; > > the routine 'knows' it wants $1 and $4. Another pass through

Re: use constant

2005-12-19 Thread John W. Krahn
David Gilden wrote: > Greetings, Hello, > I looked for documentation on 'use constant' but it has eluded it me. > > my $path = `pwd`; > use constant UPLOAD_DIR => "/home/sites/site123/web/private/_data/"; > > > I want to get the Document Root at runtime and concatenate like such...

Reading the built-in number variables

2005-12-19 Thread vansyckellist
The issue: I have a routine which builds a regex and 'knows' which paren matches to use afterwords. For instance after a line such as: use strict; my $data =~ m/^(\S+)\s+((\S+\s+)?(\S+))$/; the routine 'knows' it wants $1 and $4. Another pass through the regex will be different and the variabl

use constant

2005-12-19 Thread David Gilden
Greetings, I looked for documentation on 'use constant' but it has eluded it me. my $path = `pwd`; use constant UPLOAD_DIR => "/home/sites/site123/web/private/_data/"; I want to get the Document Root at runtime and concatenate like such... my $path = `pwd`; use constant UPLOAD_DIR

Re: Constant Hash problem

2005-12-19 Thread John W. Krahn
Shawn Corey wrote: > John W. Krahn wrote: >> Shawn Corey wrote: >>> for my $key ( sort keys %{ { STOPWORDS } } ){ >>> my $value = ${ { STOPWORDS } }{$key}; >> >> >> In both lines you are copying the entire list to an anonymous hash. >> If you >> want efficient code (and less punctuation) you shou

Re: parse hash to module

2005-12-19 Thread JupiterHost.Net
You can do either but a refernce is more efficient: Maybe I should use a reference as you suggest now Iam using ... MyModule::function(%person) and in my function : my %person = @_; For now I don't think I have an performance issue, - but ofcourse for now I have 2 copies. 2 copies is tw

Re: Constant Hash problem

2005-12-19 Thread Shawn Corey
John W. Krahn wrote: Shawn Corey wrote: for my $key ( sort keys %{ { STOPWORDS } } ){ my $value = ${ { STOPWORDS } }{$key}; In both lines you are copying the entire list to an anonymous hash. If you want efficient code (and less punctuation) you should just use a hash. Efficiency. There's

Re: Constant Hash problem

2005-12-19 Thread John W. Krahn
Kevin Old wrote: > On 12/16/05, John W. Krahn <[EMAIL PROTECTED]> wrote: >>Kevin Old wrote: >>>On 12/16/05, John W. Krahn <[EMAIL PROTECTED]> wrote: Kevin Old wrote: >I'm trying to define a constant hash and have the following: > >use constant STOPWORDS => map { lc $_ , 1 } qw(

Re: Constant Hash problem

2005-12-19 Thread Kevin Old
On 12/16/05, John W. Krahn <[EMAIL PROTECTED]> wrote: > Kevin Old wrote: > > On 12/16/05, John W. Krahn <[EMAIL PROTECTED]> wrote: > >>Kevin Old wrote: > >> > >>>I'm trying to define a constant hash and have the following: > >>> > >>>use constant STOPWORDS => map { lc $_ , 1 } qw(a about above acro

about Excel modules

2005-12-19 Thread Jennifer Garner
hi,Lists, I use Spreadsheet::WriteExcel / Spreadsheet::ParseExcel modules to access and write excel files. The questions is, how to move the cursor in some a column to the top of next column?Thanks. Merry Xmas! :-)

Re: parse hash to module

2005-12-19 Thread Ditlev, Unix Consulting
"JupiterHost.Net" <[EMAIL PROTECTED]> skrev i en meddelelse news:[EMAIL PROTECTED] > Ditlev, Unix Consulting wrote: >> Hi There, > > Hello, > >> I have some problems undestanding how to parse a hash to module of my >> own. >> >> I have this hash %person : >> $person{$Name}{Name} = "xxx"; >> $pers

Re: Split element in array

2005-12-19 Thread Ing. Branislav Gerzo
Andrej Kastrin [AK], on Monday, December 19, 2005 at 13:13 (+0100) thinks about: AK> So, following code split each line and print it. AK> while (<>){ AK> @column = split(/\t/,$_); # split current line, field separator set AK> to tab AK> print OUTPUT "$column[0]\t$column[1]\tt$column[2]\n"

Re: Split element in array

2005-12-19 Thread John Doe
Andrej Kastrin am Montag, 19. Dezember 2005 13.13: > Ing. Branislav Gerzo wrote: > >Andrej Kastrin [AK], on Monday, December 19, 2005 at 10:41 (+0100) > >typed: > > > >AK> 1 BRCA3 BRCA33|BRCA55 symbol 998 > >AK> 2 ABCB1 DASH|BASG|AVGA4 symbol 7583 > >AK> In first step I split ea

Re: Split element in array

2005-12-19 Thread Andrej Kastrin
Ing. Branislav Gerzo wrote: Andrej Kastrin [AK], on Monday, December 19, 2005 at 10:41 (+0100) typed: AK> 1 BRCA3 BRCA33|BRCA55 symbol 998 AK> 2 ABCB1 DASH|BASG|AVGA4 symbol 7583 AK> In first step I split each row and store it in array; e.g.: AK> @array=( '1', 'BRCA3',

Update All Modules CPAN.pm

2005-12-19 Thread Joel Divekar
Hi Under CPAN when I run r command, I get the list of updatable modules. Is there any command to get all these modules auto updated. Thanks. Regards Joel Mumbai, India 9821421965 __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam prot

Re: Split element in array

2005-12-19 Thread Ing. Branislav Gerzo
Andrej Kastrin [AK], on Monday, December 19, 2005 at 10:41 (+0100) typed: AK> 1 BRCA3 BRCA33|BRCA55 symbol 998 AK> 2 ABCB1 DASH|BASG|AVGA4 symbol 7583 AK> In first step I split each row and store it in array; e.g.: AK> @array=( '1', 'BRCA3', 'BRCA33|BRCA55', 'symbol998')

Split element in array

2005-12-19 Thread Andrej Kastrin
Hi all So, I have 4 fields file; fields are tab separated: 1 BRCA3 BRCA33|BRCA55 symbol 998 2 ABCB1 DASH|BASG|AVGA4 symbol 7583 In first step I split each row and store it in array; e.g.: @array=( '1', 'BRCA3', 'BRCA33|BRCA55', 'symbol998') Now I have to split thir