RE: randomizing two dimensional array

2004-06-10 Thread N, Guruguhan \(GEAE, Foreign National, EACOE\)
Hi All, In continuation to my earlier mail I am putting my code here for generating the two dimensional array foreach $k (0 ..$n_fac-1) { for ($i=1;$i<=$N;$i++) { $x[$k][$i] = $low[$k] + ($high[$k] - $low[$k])* $random[$i]; } } I

Re: Net::Telnet login problem

2004-06-10 Thread Ziggy
On Friday 11 June 2004 07:50, Ramprasad A Padmanabhan wrote: > Hi, > I have written a web based utility that requires to login to several > machines and do some routine tasks > MY script uses Net::Telnet and works fine on most machines > I use the the login() method to login to the servers > > Th

getting data

2004-06-10 Thread aditi gupta
hi to all, well, a listing of sequence similarity is as follows: # BLASTN 2.2.9 [May-01-2004] # Query: gi|37182815|gb|AY358849.1| Homo sapiens clone DNA180287 ALTE (UNQ6508) mRNA, complete cds # Database: nr # Fields: Query id, Subject id, % identity, alignment length, mismatches, gap opening

RE: Concatenating line into array problem

2004-06-10 Thread Charles K. Clarkson
From: Edward Wijaya wrote: :: How about: :: :: my @crseq; :: while ( <> ) { :: next unless/^[ACGT]/; :: chomp; :: push @crseq, $_ . scalar <>; :: } :: print @crseq; :: : : Hi Charles, : : Thanks for your reply. : : Your code works for my example in e

Re: Concatenating line into array problem

2004-06-10 Thread Edward Wijaya
How about: my @crseq; while ( <> ) { next unless/^[ACGT]/; chomp; push @crseq, $_ . scalar <>; } print @crseq; Hi Charles, Thanks for your reply. Your code works for my example in email, but not the file with more lines, (please see attached file). So sorry if I didn't give precise

Net::Telnet login problem

2004-06-10 Thread Ramprasad A Padmanabhan
Hi, I have written a web based utility that requires to login to several machines and do some routine tasks MY script uses Net::Telnet and works fine on most machines I use the the login() method to login to the servers The problem comes when the server sometimes has a different prompt password

RE: Concatenating line into array problem

2004-06-10 Thread Charles K. Clarkson
From: Edward Wijaya wrote: : #---My Code -- : while (<>) { : if (/^>/) { : next; : } : chomp; : $line .= $_; : } : push (@crseq, $line); : print join("\n", @crseq), "\n"; How about: my @crseq; while ( <> ) { next unless

Re: Concatenating line into array problem

2004-06-10 Thread Edward Wijaya
On Thu, 10 Jun 2004 21:19:17 -0700, Tim Johnson <[EMAIL PROTECTED]> wrote: while (<>) { if (/^>/) { push (@crseq, $line); next; } chomp; $line .= $_; } shift @crseq; print join("\n", @crseq), "\n"; #

RE: Concatenating line into array problem

2004-06-10 Thread Tim Johnson
This might be closer to what you want. Just push the line onto the array every time you come to the '>' character. You'll get one empty line at the beginning, that's why I put the shift line in. while (<>) { if (/^>/) { push (@crseq, $line);

Re: safe regex in variable

2004-06-10 Thread Randy W. Sims
On 6/10/2004 11:35 PM, JupiterHost.Net wrote: Hello group! I'm wanting to have a safe way to use variables in regexp. I've heard its very dangerous to just run it because people could have evil stuff in the variable to do bad bad things... so $foo =~ m/$evilregexhere/; could be bad unless $evilre

Concatenating line into array problem

2004-06-10 Thread Edward Wijaya
Hi groups, I have a file which contain many many of this line (Fasta Format): YNL331C CAATATGCGAGGGACCTACATGTTGA CATGACAATGAATTCTATTGAA YKL071W ATAATTATTCCTGTTTCTTTAACCTG GTGTACAAACACTTAAGC What I would like to do is to concatenate the line below > into one single string. Such as the

safe regex in variable

2004-06-10 Thread JupiterHost.Net
Hello group! I'm wanting to have a safe way to use variables in regexp. I've heard its very dangerous to just run it because people could have evil stuff in the variable to do bad bad things... so $foo =~ m/$evilregexhere/; could be bad unless $evilregex was untainted (no relation to -T ;p) I'v

Re: Elegant quoted word parsing

2004-06-10 Thread JupiterHost.Net
Beau E. Cox wrote: Does anyone want to help me find elegance? I think it looks pretty nice the way it is :) I do beleive you've found it Beau! ;p Aloha => Beau; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Elegant quoted word parsing

2004-06-10 Thread Beau E. Cox
Hi - I am trying to come up with a simple, elegant word parsing script, that: * takes a scalar string, and * splits it into words separating on white space, commas, and a set of delimiters: "" '' // () {} [] ##, and * returns the array of words. So far I have: # -

Making sense of \x00

2004-06-10 Thread gohaku
Hi everyone, Working with a .wav file, I get one of these values "\x00" and "\x00\x1b" which looks like hexadecimal characters. I tried sprintf, unpack, ord but I have no idea what I'm doing. can anybody tell me how to interpret these values. Thanks. with regards, -gohaku -- To unsubscribe, e-mai

Re: Exception Handling - Professionally

2004-06-10 Thread Scott Stearns
On 08 Jun 2004, you wrote in perl.beginners: > Greetings, > > For you professional Perl programmers: how do you approach > exception-handling in the your world? I know there are a lot of ways > Perl gives us to do this: basic 'die', eval'ing blocks of code and the > Exception.pm module but is the

Re: regular expression

2004-06-10 Thread Mike Flannigan
> Subject: regular expression > Date: Wed, 9 Jun 2004 18:46:30 -0500 (CDT) > From: Mandar Rahurkar <[EMAIL PROTECTED]> > CC: [EMAIL PROTECTED] > > Hi, >I am looking for URL's that end in .html OR .htm or / > > if($URL =~ /[.html$|.htm$|\/$]/) { > #do somthing > } > > whats wrong with the abov

Re: procfarm equivalent

2004-06-10 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Ron Willmert) writes: >Is there a Unix equivalent Win32-ProcFarm? I really like having the >module decide how many process' to create and how it doles out the jobs >and getting the return values from the process' so easily. Try Parallel::ForkMa

Re: Exception Handling - Professionally

2004-06-10 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Randal L. Schwartz) writes: >> "Drieux" == Drieux <[EMAIL PROTECTED]> writes: > >Drieux>if ( ref($got_back) eq "Foo::Bar") > >No no no. Stop using ref(). It means you can't replace it >with a subclass of it. > >You want (and I show

Re: Have you seen this error before?

2004-06-10 Thread James Edward Gray II
Let's keep our discussions on the list, so we can all help and learn. On Jun 10, 2004, at 1:15 PM, jason corbett wrote: This statement  ( print "%record}"."\n"; print "%record}"."\n"; )  from my script below keeps giving the error use of uninitialized value in list argument at line <##>, line 3

Re: Have you seen this error before?

2004-06-10 Thread James Edward Gray II
On Jun 10, 2004, at 12:56 PM, jason corbett wrote: Thanks for the advice. No problem. What is best for selecting records from a database: Hash or Array? Array if you want to walk it be index, hash if you want to walk it by name. There is no "best". ;) James -- To unsubscribe, e-mail: [EMAIL PRO

Re: Have you seen this error before?

2004-06-10 Thread James Edward Gray II
On Jun 10, 2004, at 12:36 PM, jason corbett wrote: I am getting the error: ARRAY(0x1024df4) It's not an "error". It's what you see when you try to print an array reference. This line is where it's coming from: print "$record\n"; If you wanted to see what's in the array referenced by $record, tr

Have you seen this error before?

2004-06-10 Thread jason corbett
I am getting the error: ARRAY(0x1024df4) ARRAY(0x1024df4) ARRAY(0x1024df4) ARRAY(0x1024df4) ARRAY(0x1024df4) ARRAY(0x1024df4) ARRAY(0x1024df4) ARRAY(0x1024df4) ARRAY(0x1024df4) ARRAY(0x1024df4) when I run the script below: #!/usr/bin/perl -w use strict; use DBI; my $dbh = DBI->connect($

Re: Installing the libwww-perl module on Mac os X 10.3.2

2004-06-10 Thread Phil Calvert
Thanks for the pointer - I wondered if there was such a list and I looked for one (obviously, not hard enough). Thanks again. --Phil On Jun 10, 2004, at 9:37 AM, James Edward Gray II wrote: On Jun 10, 2004, at 11:15 AM, Phil Calvert wrote: Hello, Thanks for the reply. When I try that I get; Can't

Re: Installing the libwww-perl module on Mac os X 10.3.2

2004-06-10 Thread James Edward Gray II
On Jun 10, 2004, at 11:15 AM, Phil Calvert wrote: Hello, Thanks for the reply. When I try that I get; Can't locate object method "install" via package "LWP" at -e line 1. I should also say that I tried "sudo perl -MCPAN -e 'CPAN::install LWP'" and got the result that I reported previously. You mig

Re: Installing the libwww-perl module on Mac os X 10.3.2

2004-06-10 Thread Phil Calvert
Hello, Thanks for the reply. When I try that I get; Can't locate object method "install" via package "LWP" at -e line 1. I should also say that I tried "sudo perl -MCPAN -e 'CPAN::install LWP'" and got the result that I reported previously. On Jun 10, 2004, at 9:07 AM, James Edward Gray II wrote:

Re: Installing the libwww-perl module on Mac os X 10.3.2

2004-06-10 Thread James Edward Gray II
On Jun 10, 2004, at 9:39 AM, Phil Calvert wrote: OK, after poking around a bit it seems that the the developer tools need to be installed. Having done that I now get this after running the line perl -MCPAN -e 'CPAN::install LWP' Try: sudo perl -MCPAN -e 'install LWP' You'll need to give the admi

Re: Type of Uploaded File CGI.pm

2004-06-10 Thread Wiggins d Anconia
> > Hi all > > I am trying to find the file type of a file being uploaded > > im using CGI.pm for uploading the file > > here is the code > > > ** > > $filename1 = $q->param("test_file"); > my $uploadFileHandle = $q->upload("test_file

Type of Uploaded File CGI.pm

2004-06-10 Thread Sudhir Sambrani
Hi all I am trying to find the file type of a file being uploaded im using CGI.pm for uploading the file here is the code ** $filename1 = $q->param("test_file"); my $uploadFileHandle = $q->upload("test_file"); my $test; $type = $q->u

Re: split a word after n-letters (regexp?)

2004-06-10 Thread Roberto Etcheverry
Stephan Hochhaus wrote: A question I assume can be answered using regexp, unfortunately I am just starting my way into it. I have a bunch of words that I want to split, so that the first letters (minus n) and the last n-letters are seperated. n is user defined and therefore not static. How can

Re: split a word after n-letters (regexp?)

2004-06-10 Thread Wiggins d Anconia
> A question I assume can be answered using regexp, unfortunately I am > just starting my way into it. I have a bunch of words that I want to > split, so that the first letters (minus n) and the last n-letters are > seperated. > n is user defined and therefore not static. > > How can I have Per

Re: randomizing two dimensional array

2004-06-10 Thread Wiggins d Anconia
> Hi All, > I have a two dimensional array built like this $x[$i][$j] inside two for loops. I would like to know how can I randomize the elements of this array? > Which array, the inner or outer? perldoc -q 'shuffle an array randomly' http://danconia.org -- To unsubscribe, e-mail: [

RE: What the 'FETCH' is up with Perl?

2004-06-10 Thread Bob Showalter
jason corbett wrote: > Hello all. Can someone tell me what is the difference in the various > ways to FETCH data from a database? I bought like 3 books and they > don't really go in depth with the reasons why there are several of > them, and what happens if you interchange them with different > sce

Re: Installing the libwww-perl module on Mac os X 10.3.2

2004-06-10 Thread Phil Calvert
OK, after poking around a bit it seems that the the developer tools need to be installed. Having done that I now get this after running the line perl -MCPAN -e 'CPAN::install LWP' Failed Test Stat Wstat Total Fail Failed List of Failed --

What the 'FETCH' is up with Perl?

2004-06-10 Thread jason corbett
Hello all. Can someone tell me what is the difference in the various ways to FETCH data from a database? I bought like 3 books and they don't really go in depth with the reasons why there are several of them, and what happens if you interchange them with different scenarios. Thanks. Here are

Re: File::Find

2004-06-10 Thread Charles K. Clarkson
Melis Mutlu <[EMAIL PROTECTED]> wrote: : Here is the problem: This belongs in a new thread. Start a new message to the list that is not a reply. Knock off all this leading space. It is unnecessarily wrapping lines. If you need to reply to this message, only quote the relevant parts of the mes

split a word after n-letters (regexp?)

2004-06-10 Thread Stephan Hochhaus
A question I assume can be answered using regexp, unfortunately I am just starting my way into it. I have a bunch of words that I want to split, so that the first letters (minus n) and the last n-letters are seperated. n is user defined and therefore not static. How can I have Perl split at the

Re: returning problem of regexp

2004-06-10 Thread Ziggy
On Thursday 10 June 2004 16:21, Graf Laszlo wrote: > Hi Jose > > Thank you for your last reply. It did work. > But now I have to make some changes in my lines: > By example: > > > > BBB > > > > CCC1 > >

returning problem of regexp

2004-06-10 Thread Graf Laszlo
Hi Jose Thank you for your last reply. It did work. But now I have to make some changes in my lines: By example: BBB CCC1 CCC2 As

Re: parsing records

2004-06-10 Thread James Edward Gray II
On Jun 10, 2004, at 8:13 AM, Virmani, Amit (GMI Debt Technology) wrote: I am a novice in Perl... I have a file with records of fields in double quotes separated by commas, for example: "abc","123xyz","Test 1","Test 2","100,000"... What you describe is the CSV file format and there's really no good

randomizing two dimensional array

2004-06-10 Thread N, Guruguhan \(GEAE, Foreign National, EACOE\)
Hi All, I have a two dimensional array built like this $x[$i][$j] inside two for loops. I would like to know how can I randomize the elements of this array? Thanks Regards > Guruguhan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

parsing records

2004-06-10 Thread Virmani, Amit (GMI Debt Technology)
I am a novice in Perl... I have a file with records of fields in double quotes separated by commas, for example: "abc","123xyz","Test 1","Test 2","100,000"... I need to remove the double quotes from the records and insert this data into database using bulk copy using comma as the delimeter. Since

Re: Query on Split

2004-06-10 Thread Rob Dixon
> Sudhindra K S wrote: > > I have a file with lines as shown below > > //abc/... - //xyz/... > //abc1/... - //xyz1/... > > Now i want to split the lines at "-" and get the string on the left in one > array and the string on the right in another array. > > ie: array1 = (//abc, //abc1) and array2 = (

reverse IP lookup for check all doimains on the server

2004-06-10 Thread Maxipoint Rep Office
Have someone any idea what I must to do? if I add some IP of server that I can see all domains on the same IP on the server. http://whois.webhosting.info/216.127.92.54 Mario --- Free professional Perl web hosting without

File::Find

2004-06-10 Thread Melis Mutlu
Hi again, Here is the problem: I want to search for a string in a directory. I copy-pasted whole program as below: What program does is, . . simply nothing. It returns nothing. Can anybody see why? Can it be related to a problem with the

Re: Query on Split

2004-06-10 Thread Prasanna Kothari
have a look at Split function: http://www.perldoc.com/perl5.8.4/pod/func/split.html sudhindra k s wrote: Hi I have a file with lines as shown below //abc/... - //xyz/... //abc1/... - //xyz1/... Now i want to split the lines at "-" and get the string on the left in one array and the string on t