Re: Net::Telnet login problem

2004-06-11 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 The

RE: randomizing two dimensional array

2004-06-11 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

splitting

2004-06-11 Thread aditi gupta
hi to all, i have a file $seq, in following format: gi|37182815|gb|AY358849.1| gi|2353725|gb|AF015490.1|AF015490 100.00 16 0 0 544 559 320 335 4.2 32.21 gi|37182815|gb|AY358849.1| gi|1335960|gb|U55203.1|BTU55203 100.00 16 0 0 544 559 380 395 4.2 32.21 gi|37182815|gb|AY358849.1|

Re: returning problem of regexp

2004-06-11 Thread Graf Laszlo
Hi Ziggy You got me wrong. Anyway thanks for example. Take a look here: #!/usr/bin/perl @str = (); push @str, sm:a\n; push @str, sm:b\n; push @str, BBB\n; push @str, /sm:b\n; push @str, sm:cs\n;#- watch this line push @str, sm:c no=\1\\n; push @str, CCC1\n; push @str, /sm:c\n; push

Re: splitting

2004-06-11 Thread Randy W. Sims
aditi gupta wrote: hi to all, i have a file $seq, in following format: gi|37182815|gb|AY358849.1| gi|2353725|gb|AF015490.1|AF015490 100.00 16 0 0 544 559 320 335 4.2 32.21 gi|37182815|gb|AY358849.1| gi|1335960|gb|U55203.1|BTU55203 100.00 16 0 0 544 559 380 395 4.2 32.21

Re: splitting

2004-06-11 Thread Anders Holm
Hi Aditi. During the split, what you have specifid is to match: gi OR 37182815 OR gb OR AY358849.1 ... That's what is giving the result you have. I.e. the | means OR in a regexp like the one used in split... Easiest solution is to escape the pipe character, i.e.:

search and move 'expired files'

2004-06-11 Thread Shu Hung ()
Hello all, I want a script to move all 'expired files' to a folder. So I wrote the script below. However, a problem came out: the find function run everything in the address, including the entire folders structure!!! I want to move those files and files only. What can I do? (*note: the OS is

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

2004-06-11 Thread John W. Krahn
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.

Re: Query on Split

2004-06-11 Thread John W. Krahn
Sudhindra K S wrote: Hi Hello, 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

RE: search and move 'expired files'

2004-06-11 Thread Tim Johnson
You can use the -d file test to check if the file is a directory before moving it. unless(-d $whatever_file){ do whatever... -Original Message- From: Shu Hung () [mailto:[EMAIL PROTECTED] Sent: Fri 6/11/2004 3:50 AM To: Perl Beginner Mail Group Cc: Subject: search and move

Re: Concatenating line into array problem

2004-06-11 Thread John W. Krahn
Edward Wijaya wrote: Hi groups, Hello, 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

Re: Concatenating line into array problem

2004-06-11 Thread John W. Krahn
John W. Krahn wrote: This should do what you want: $/ = ''; while ( ) { next unless s/\s+\S.*//; chomp; tr/\n//d; print $_\n; } After seeing your data file change that to: $/ = ''; while ( ) { next unless s/\S+.*\n//; chomp; tr/\n//d; print $_\n;

Color Space

2004-06-11 Thread Iván Biosca
Hello, anyone know how to change the color space of an image from cmyk to rgb using perl? I don´t know if it´s possible without use ImageMagick Thanks! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Very wierd problem with CGI.pm

2004-06-11 Thread mike
Has anyone ever come accross this wied problem before I have a script which pulls records from a DB then loops into a form and shows each record, with the id no being concatenated to the field name to give a unique record id. However if I have this

RE: Very wierd problem with CGI.pm

2004-06-11 Thread Bob Showalter
mike wrote: Has anyone ever come accross this wied problem before I have a script which pulls records from a DB then loops into a form and shows each record, with the id no being concatenated to the field name to give a unique record id. However if I have this

Re: Elegant quoted word parsing

2004-06-11 Thread James Edward Gray II
On Jun 10, 2004, at 9:46 PM, Beau E. Cox wrote: 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.

Re: getting data

2004-06-11 Thread Roberto Etcheverry
Is this what you need? #!/usr/bin/perl use strict; # List of required columns separated by ', ', must match names in 'Fields:' my $req_fields = shift || 'Subject id, % identity, alignment length, mismatches, q. start, q. end'; # Split into array my @req_fields = split /, /, $req_fields; # Print

Re: Perl POST

2004-06-11 Thread Jenda Krynicky
From: dan [EMAIL PROTECTED] Experiencing a little, if not more, difficulty in attempting to achieve what's probably a simple task. Here's the situation. The user presses a button. The website takes them to a page where they can sign up for a selected package, entering a username and

Re: splitting

2004-06-11 Thread Roberto Etcheverry
If you split the line like this: @seqs=split(/gi|37182815|gb|AY358849.1|/,$seq); It means the fields are separated by 'gi' or '37182815' or 'gb' or 'AY358849.1'. I don't think this is what you are looking for... From the previous post, it seems the file is separated by tabs, so

SQL PLUS

2004-06-11 Thread jason corbett
What would I need to call SQL Plus into action for PERL? - Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger

RE: SQL PLUS

2004-06-11 Thread Bob Showalter
jason corbett wrote: What would I need to call SQL Plus into action for PERL? If you just need to execute SQL statements, use the DBI module and talk directly to the database. If you need to run existing sqlplus reports, use any of the standard facilities like system(), backticks, pipe open,

Re: Net::Telnet login problem

2004-06-11 Thread Wiggins d Anconia
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

Adding drop-in modules to a program

2004-06-11 Thread Shawn
All... I am fairly new to Perl... But I am in the middle of writing a program where I need to add the ability to have a module directory, so to speak, where others can write modules, place them in the module directory, and have them executed by the main program... Of course, there are

Re: search and move 'expired files'

2004-06-11 Thread Shu Hung ()
Tim Johnson : You can use the -d file test to check if the file is a directory before moving it. unless(-d $whatever_file){ do whatever... -Original Message- From: Shu Hung () [mailto:[EMAIL PROTECTED] Sent: Fri 6/11/2004 3:50 AM To: Perl Beginner Mail Group Cc: Subject: search

Re: safe regex in variable

2004-06-11 Thread JupiterHost.Net
Do what I'd like to be able to do is: my ($find,$replacewith,$case) = $dbh-selectrow_array($query); $string =~ s/$find/$replace/gi if $case; $string =~ s/$find/$replace/g if !$case; Since a user could put whatever they want in the database what should I do to make that work so its safe? If there

Re: Adding drop-in modules to a program

2004-06-11 Thread Wiggins d Anconia
All... I am fairly new to Perl... But I am in the middle of writing a program where I need to add the ability to have a module directory, so to speak, where others can write modules, place them in the module directory, and have them executed by the main program... Of course, there are

Re: Color Space

2004-06-11 Thread Wiggins d Anconia
Hello, anyone know how to change the color space of an image from cmyk to rgb using perl? I don´t know if it´s possible without use ImageMagick Thanks! Something wrong with PerlMagick? A quick glance revealed Graphics::ColorObject on CPAN that appears to do what you want.

Best Technique to display a query.

2004-06-11 Thread jason corbett
What technique can I use to take a quick SQL query and get the data back in columns and rows? I am trying to make a format template, but I would like a way to make a quick display template that will work with all my simple SQL queries. Thanks, JC

Re: Concatenating line into array problem

2004-06-11 Thread Zeus Odin
This works: ---BEGIN CODE--- #!/usr/bin/perl use warnings; use strict; $/ = ''; while (DATA) { s/(.*?\n.*?)\n/$1/s; print; } __DATA__ YNL331C CAATATGCGAGGGACCTACATGTTGA CATGACAATGAATTCTATTGAA YKL071W ATAATTATTCCTGTTTCTTTAACCTG GTGTACAAACACTTAAGC ---END CODE---

Changing user in perl

2004-06-11 Thread Tham, Philip
I am trying to execute a perl script from html. However this is to be executed by a certain user and the script also updates files in the system. Is there a was I can do a chuser and set the s-bit. Philip Tham -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

MS Word to PDF

2004-06-11 Thread Realtor Leader
I would like a tool (eventually to be used online) that could convert MS = Word documents into PDF files. I've reviewed CPAN and was surprised to = not find any modules that would accomplish this task. Can anybody = provide guidance to me on how I could produce a module to accomplish = this? I

Re: safe regex in variable

2004-06-11 Thread Randy W. Sims
JupiterHost.Net wrote: Do what I'd like to be able to do is: my ($find,$replacewith,$case) = $dbh-selectrow_array($query); $string =~ s/$find/$replace/gi if $case; $string =~ s/$find/$replace/g if !$case; Since a user could put whatever they want in the database what should I do to make that work

RE: SQL PLUS

2004-06-11 Thread Jeff Westman
Bob Showalter [EMAIL PROTECTED] wrote: jason corbett wrote: What would I need to call SQL Plus into action for PERL? If you just need to execute SQL statements, use the DBI module and talk directly to the database. If you need to run existing sqlplus reports, use any of the standard

Passing online parameters to perf from a browser

2004-06-11 Thread Tham, Philip
Hi I wanted to run the command Command.pl abc cde def I used http://www.address/command.pl?abccdedef However the script is passing only one argument abccdedef to the script. How do I achieve the above. Philip Tham MMS Lab support Desk 425 580 1670 -- To unsubscribe, e-mail: [EMAIL

Re: Elegant quoted word parsing

2004-06-11 Thread Zeus Odin
This is certainly shorter, but I doubt it fully adheres to your intent. It produces the same output as your procedure for this string, but it is possible that I changed some of the meaning of what you were trying to do: ---BEGIN CODE--- #!/usr/bin/perl use warnings; use strict; print

Re: Passing online parameters to perf from a browser

2004-06-11 Thread JupiterHost.Net
Tham, Philip wrote: Hi Hello, I wanted to run the command Command.pl abc cde def I used http://www.address/command.pl?abccdedef However the script is passing only one argument abccdedef to the script. How do I achieve the above. You need to use CGI.. #!/usr/bin/perl use strict; use

Re: safe regex in variable

2004-06-11 Thread JupiterHost.Net
Randy W. Sims wrote: JupiterHost.Net wrote: Do what I'd like to be able to do is: my ($find,$replacewith,$case) = $dbh-selectrow_array($query); $string =~ s/$find/$replace/gi if $case; $string =~ s/$find/$replace/g if !$case; Since a user could put whatever they want in the database what should

use CGI qw(:standard);

2004-06-11 Thread Werner Otto
Hi, I am making use of use CGI qw(:standard); to create my form. I need to amend the size of a submit button and need to tell the button which script to call (ie. action=test.cgi). Where can I find documentation on all the attributes of the components, or an example for my two queries would be

Re: use CGI qw(:standard);

2004-06-11 Thread Owen Cook
On Fri, 11 Jun 2004, Werner Otto wrote: I am making use of use CGI qw(:standard); to create my form. I need to amend the size of a submit button and need to tell the button which script to call (ie. action=test.cgi). Where can I find documentation on all the attributes of the components,

Re: use CGI qw(:standard);

2004-06-11 Thread David Dorward
On 11 Jun 2004, at 09:57, Werner Otto wrote: I am making use of use CGI qw(:standard); to create my form. I need to amend the size of a submit button print $query-submit(-name='button_name', -size=15, -value='value'); and need to tell the button

joining form input in parser

2004-06-11 Thread William Kolln
HI Any help will be greatly appreciated. The below statement is my parsing statement. It may be antiquated but it works. I want to process input from a select form that has two names and two name values name=group1 , value1= name=group2 , value2= IN the below

RE: help with adjusting log file data?

2004-06-11 Thread Ron Goral
-Original Message- From: Charles K. Clarkson [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 09, 2004 9:19 PM To: 'Catriona Pure Scents'; [EMAIL PROTECTED] Subject: RE: help with adjusting log file data? From: Catriona Pure Scents mailto:[EMAIL PROTECTED] wrote: : Hi Charles,

Re: joining form input in parser

2004-06-11 Thread Wiggins d Anconia
HI Any help will be greatly appreciated. The below statement is my parsing statement. It may be antiquated but it works. If it does then you wouldn't need to ask right? It is antiquated, very, and shouldn't be used when there are much better ways to do this, specifically the CGI module.

Re: joining form input in parser

2004-06-11 Thread Brad Lhotsky
Is this 2004? or 1994? I forgot. On Fri, Jun 11, 2004 at 08:09:52PM +1000, William Kolln wrote: HI Any help will be greatly appreciated. The below statement is my parsing statement. It may be antiquated but it works. I want to process input from a select form that has two names and

Re: joining form input in parser

2004-06-11 Thread Wiggins d Anconia
Only re-inforced what you already stated, yep the truth hurts, doesn't mean it isn't the truth. Don't worry, I won't, and good chance others won't either. http://www.catb.org/~esr/faqs/smart-questions.html http://danconia.org Having viewed your website, I can understand your reply. Next

Re: use CGI qw(:standard);

2004-06-11 Thread Camilo Gonzalez
Owen Cook wrote: On Fri, 11 Jun 2004, Werner Otto wrote: I am making use of use CGI qw(:standard); to create my form. I need to amend the size of a submit button and need to tell the button which script to call (ie. action=test.cgi). Where can I find documentation on all the attributes of