Auto hashName generator;

2005-08-02 Thread Umesh T G
Hello List, I am finding problem in generating a hash names. for eg. I have an array of elements. All elements should be converted into hash name and should get intialised. Say.. @Arr = qw ('one', 'two'); foreach $word (@Arr) { $name = $word."hash"; Here I should intialise the hash.. lik

Re: Auto hashName generator;

2005-08-02 Thread John W. Krahn
Umesh T G wrote: > Hello List, Hello, > I am finding problem in generating a hash names. for eg. > > I have an array of elements. All elements should be converted into > hash name and should get intialised. > > Say.. > > @Arr = qw ('one', 'two'); > > foreach $word (@Arr) { >$name = $word.

Strange compilation error.

2005-08-02 Thread jhonnystecchino
When i compile perl 5.8.7 , 5.8.6 and 5.6.2, the compiler gives me always the same error: I type: ./Configure -d make and then the error appears: `sh cflags "optimize='-O2'" toke.o` toke.c CCCMD = cc -DPERL_CORE -c -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_Sl

Re: Auto hashName generator;

2005-08-02 Thread Umesh T G
On 8/2/05, John W. Krahn <[EMAIL PROTECTED]> wrote: > Umesh T G wrote: > > perldoc -q "How can I use a variable as a variable name" > Much Thanks... It is helpful. Cheers, Umesh. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Hi

2005-08-02 Thread Anish Kumar K
Hi I want to retreive from postgres database by removing the dos characters and the spaces from a perl file. It is like in the DB side there is " " and dos charcters in the table itself. So when I am doing a select query as it is checking in the table, the correct match is not obtained. I hav

ref / hash

2005-08-02 Thread Brent Clark
Hi all I my thanks to all whom have tried to help me earlier, but alas, I still cant seem to get this right. I know this gonna kick me because it will be a stupid small mistake. my ($ref_hash, $fileName) = @_; foreach my $roomCode ( keys %{ $ref_hash->{$fileNa

Re: ref / hash

2005-08-02 Thread JupiterHost.Net
Brent Clark wrote: Hi all I my thanks to all whom have tried to help me earlier, but alas, I still cant seem to get this right. I know this gonna kick me because it will be a stupid small mistake. my ($ref_hash, $fileName) = @_; foreach my $roomCode ( keys %{ $ref_hash->{$

Re: ref / hash

2005-08-02 Thread John Doe
Brent Clark am Dienstag, 2. August 2005 14.08: > Hi all > > I my thanks to all whom have tried to help me earlier, but alas, I still > cant seem to get this right. > I know this gonna kick me because it will be a stupid small mistake. use strict; use warnings; at the beginning of the scri

Re: ref / hash

2005-08-02 Thread John W. Krahn
Brent Clark wrote: > Hi all Hello, > I my thanks to all whom have tried to help me earlier, but alas, I still > cant seem to get this right. > I know this gonna kick me because it will be a stupid small mistake. > > my ($ref_hash, $fileName) = @_; > > foreach my $roomCode ( keys

Re: ref / hash

2005-08-02 Thread Brent Clark
Hi List A big thanks to all. I really appreciate your assistance in this. Kind Regards and a big thanks again. Brent Clark -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

A better way.

2005-08-02 Thread Dan Klose
Hello Everyone. I have the following code: ### CODE BLOCK ### my %hash_of_arrays2; for (keys %hash_of_arrays) { my @array_of_data = exists($hash_of_arrays{$_}) [EMAIL PROTECTED] :(); my $mean = mean([EMAIL PROTECTED]); #GET MEAN my $std_dev = dev([EMAIL PROTECTED]); #GET STAND

postgresql questions, was Re: Hi

2005-08-02 Thread Chris Devers
On Tue, 2 Aug 2005, Anish Kumar K wrote: > I want to retreive from postgres database by removing the dos > characters and the spaces from a perl file. It is like in the DB side > there is " " and dos charcters in the table itself. So when I am doing > a select query as it is checking in the tab

Re: A better way.

2005-08-02 Thread Wiggins d'Anconia
Dan Klose wrote: > Hello Everyone. > > I have the following code: > > > ### CODE BLOCK ### > > my %hash_of_arrays2; > Have you considered a hash of hashes? For me, given the sample below, I would prefer it, but obviously I haven't seen your whole script. > for (keys %hash_of_arrays) { > my

Re: A better way.

2005-08-02 Thread Jeff 'japhy' Pinyan
On Aug 2, Dan Klose said: my %hash_of_arrays2; for (keys %hash_of_arrays) { my @array_of_data = exists($hash_of_arrays{$_}) [EMAIL PROTECTED] :(); Given that you're iterating over the list of keys in %hash_of_arrays, there's NO reason to be using exists() here. my @array_of_data

Re: A better way.

2005-08-02 Thread Dan Klose
Hi, I have gone for the following code: my %avs_dev = map{ $_ => [mean($hoa{$_}), dev($hoa{$_})] } keys %hoa; for (sort {$avs_dev{$a}[0] <=> $avs_dev{$b}[0]} keys %avs_dev) { print "$_, $avs_dev{$_}[0], $avs_dev{$_}[1]\n"; } I have never used MAP before... it looks handy! Works a treat. Th

Running a subroutine

2005-08-02 Thread Octavian Rasnita
Hi, If I want to run a subroutine passing some parameters, which is the best way to do it if that subroutine won't modify those parameters but just use them? 1. &subroutine(%hash); sub subroutine { %hash = @_; } 2. &subroutine(\%hash); sub subroutine { $ref = shift; $hash = %$ref; } 3. &subrout

Re: Running a subroutine

2005-08-02 Thread Jeff 'japhy' Pinyan
On Aug 2, Octavian Rasnita said: If I want to run a subroutine passing some parameters, which is the best way to do it if that subroutine won't modify those parameters but just use them? There's always the *potential* to modify the things you send a function, but only if you're really specifi

reg exp using \G

2005-08-02 Thread DBSMITH
All, I think I am on the right track as far as what assertion to use. I need to print from one string to another using .. with \G My goal is to capture from allsets down. thank you Here is my code: #!/usr/bin/perl use strict; use warnings; $ENV{PATH} = qq(/opt/SUNWsamfs/sbin:/usr/bin); open

Re: reg exp using \G

2005-08-02 Thread Dave Gray
On 8/2/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I think I am on the right track as far as what assertion to use. I need to > print from one string to another using .. with \G Why do you want to use \G? > My goal is to capture from allsets down. > Here is my code: > > #!/usr/bin/perl >

firing an external program and exiting

2005-08-02 Thread Ram
I have a situation where a CGI script has to start an independent perl script and exit without capturing the output or waiting for the exit code. It doesnt make any practicle sense to me as this perl script takes good 6 hours to run and my CGI script obviously shouldnt keep the user waiting. ex

Re: reg exp using \G

2005-08-02 Thread DBSMITH
Dave, technically you are correct about escaping the dot, but in this particular situation my regexp is working. I will escape the dot. my goal again is to print from one sting to another from "allsets" down. I apologize for the long output if data, but I want to reflect 100% accuracy. Any

Re: reg exp using \G

2005-08-02 Thread John Doe
[EMAIL PROTECTED] am Dienstag, 2. August 2005 19.36: > reg exp using \G > Datum: 2.8.05  19:36:44 > Von: [EMAIL PROTECTED] > An: beginners@perl.org > > All, > > I think I am on the right track as far as what assertion to use.  I need to > print from one string to another using .. with \G Your b

Re: reg exp using \G

2005-08-02 Thread Dave Gray
On 8/2/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > technically you are correct about escaping the dot, but in this particular > situation my regexp is working. I will escape the dot. > my goal again is to print from one sting to another from "allsets" > down. I apologize for the long o

Re: reg exp using \G

2005-08-02 Thread DBSMITH
yes but the problem is my start point and end point have identical entries under them. It is stopping at original1.1 when I need for it to stop at the end of original1.1 and print media: sf Volumes: STK000 Total space available: 60.8G as opposed to just allsets to original1.1 For example

Re: reg exp using \G

2005-08-02 Thread Dave Gray
On 8/2/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > yes but the problem is my start point and end point have identical entries > under them. It is stopping at original1.1 when I need for it to stop at > the end of original1.1 and print > > media: sf > Volumes: >STK000 > Total space av

Re: reg exp using \G

2005-08-02 Thread Dave Gray
On 8/2/05, Dave Gray <[EMAIL PROTECTED]> wrote: > On 8/2/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > yes but the problem is my start point and end point have identical entries > > under them. It is stopping at original1.1 when I need for it to stop at > > the end of original1.1 and print

Re: firing an external program and exiting

2005-08-02 Thread Dave Gray
On 8/2/05, Ram <[EMAIL PROTECTED]> wrote: > I have a situation where a CGI script has to start an independent perl > script and exit without capturing the output or waiting for the exit code. > It doesnt make any practicle sense to me as this perl script takes good 6 > hours to run and my CGI scrip

Re: reg exp using \G

2005-08-02 Thread DBSMITH
ok I understand now...thanks, but I tried it and it is still stopping at original1.1 I then modified it to print YE if ($1) but never saw YE in STDOUT. Dave Gray

Re: firing an external program and exiting

2005-08-02 Thread Dave Gray
On 8/2/05, Ram <[EMAIL PROTECTED]> wrote: > > > > I tried > > > > > > exec("command"); > > > and also > > > system("command &"); > > > > > > Niether seemed to work, for the reason which I assume is, since it is a > CGI > > > script and webserver waits until this script exits and then displays the

Re: reg exp using \G

2005-08-02 Thread Jay Savage
Please don't top post. I think you've been asked this before. On 8/2/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > ok I understand now...thanks, but I tried it and it is still stopping at > original1.1 > I then modified it to print YE if ($1) but never saw YE in STDOUT. Tha's becau

I finally blew my TAINT

2005-08-02 Thread Tom Allison
I've been working on some HTML::Mason authentiation code for a bit. At one point it was working find but I decided to rewrite some goodies to clean things up a bit. Now I'm in trouble. So I'm trying to get beyond this tainting stuff I tried $username =~ s/[EMAIL PROTECTED]//g; but th

perlstyle

2005-08-02 Thread Tom Allison
What do they mean by "Uncuddled elses." in perldoc perlstyle? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: I finally blew my TAINT

2005-08-02 Thread Jeff 'japhy' Pinyan
On Aug 2, Tom Allison said: So I'm trying to get beyond this tainting stuff I tried $username =~ s/[EMAIL PROTECTED]//g; but that doesn't seem to do it. Detainting via a regex requires you use text that matched; what this means is you must use a capture variable. In your case, you

Re: perlstyle

2005-08-02 Thread Jeff 'japhy' Pinyan
On Aug 2, Tom Allison said: What do they mean by "Uncuddled elses." in perldoc perlstyle? A "cuddled else" is this kind: if (...) { ... } else { ... } whereas an uncuddled else is: if (...) { ... } else { ... } -- Jeff "japhy" Pinyan % How can we eve

Re: I finally blew my TAINT

2005-08-02 Thread Tom Allison
Jeff 'japhy' Pinyan wrote: On Aug 2, Tom Allison said: So I'm trying to get beyond this tainting stuff I tried $username =~ s/[EMAIL PROTECTED]//g; but that doesn't seem to do it. Detainting via a regex requires you use text that matched; what this means is you must use a capture

RE: perlstyle

2005-08-02 Thread ebgarrett
Uncuddled elses. Found @ http://learn.clemsonlinux.org/wiki/Perl | /* cuddled "else" */| /* uncuddled "else" */ | if (x > 0) {| if (x > 0) { | x += y; | x += y; | } else {| } | y += x; | else { |

INVITATION-collaboration-webapplication-research

2005-08-02 Thread vijayaraj nagarajan
hi friends this is vijay, graduate student at the university of southern mississippi, USofA. i am looking for some perl geeks, who can collaborate with our group, to produce some quick research publications. basically being a biologist, i take long time in writing codes. i believe that a few tens

Re: firing an external program and exiting

2005-08-02 Thread Ram
> > > > Yes the user cgi script is running have permissions to execute that > > script... > > > > Infact with the above mentioned methods I am able to execute the script > > very well but my cgi script is waiting until it is getting finished, > which I > > dont want. > > > > I only want my c