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

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?abc&cde&def However the script is passing only one argument abc&cde&def to the script. How do I achieve the above. You need to use CGI.. #!/usr/bin/perl use strict; use wa

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 joi

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?abc&cde&def However the script is passing only one argument abc&cde&def to the script. How do I achieve the above. Philip Tham MMS Lab support Desk 425 580 1670 -- To unsubscribe, e-mail: [EMAI

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 > s

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

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 unde

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 PR

Re: Concatenating line into array problem

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

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: 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.

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, ther

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: 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: sear

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 different

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 pr

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, fo

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: 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 'gi|37182815|gb

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: 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 he

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: 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 > "Banked",textfield(-

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 "Banked",textfield(-name=>'bk_amt'.$bank_inv,-va

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]

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/

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 con

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 mo

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

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.

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 Win

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.: @seqs=split(/gi\|37182815\|gb\

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 gi|37182815|gb|AY35

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, "\n"; push @str, "\n"; push @str, "BBB\n"; push @str, "\n"; push @str, "\n";#<- watch this line push @str, "\n"; push @str, "CCC1\n"; push @str, "\n"; push @str, "\n"; push

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| gi|133595