Re: RegExp

2004-10-14 Thread JupiterHost.Net
Mandar Rahurkar wrote: Hi, Hello, I have a bunch of text (multiple paragraphs). I want to find a sentence like 'Susan * the water' (No its not a HW problem). Here's what I am doing: #! /usr/bin/perl use strict; use warnings; $file="temp.txt"; my $file = 'temp.txt'; open(fp,$file) or die "C

RegExp

2004-10-14 Thread Mandar Rahurkar
Hi, I have a bunch of text (multiple paragraphs). I want to find a sentence like 'Susan * the water' (No its not a HW problem). Here's what I am doing: #! /usr/bin/perl use warnings; $file="temp.txt"; open(fp,$file) or die "Cant open $file :$!\n"; local $/=""; while () { while( /(sus

Re: scrolling_list and multiples

2004-10-14 Thread Gunnar Hjalmarsson
Charlotte Hee wrote: I want to allow the user to select more than one magazine so I specify the option multiple=>1 for this. The web form seems to do the right thing, highlighting more than one magazine if I hold the ctrl-key down. But when I submit the form the parameters passed only include my fi

scrolling_list and multiples

2004-10-14 Thread Charlotte Hee
Hello All, I have a test form called pbauto, that displays 3 choices of magazines and upon submit, calls itself to print out what parameters were passed. I want to allow the user to select more than one magazine so I specify the option multiple=>1 for this. The web form seems to do the right thi

Re: counting gaps in sequence data

2004-10-14 Thread Philipp Traeder
On Thursday 14 October 2004 21:44, Michael Robeson wrote: > Here is as far as I can get with some real code and pseudo code. This > is just to show you that I am actually trying. :-) Hi Michael, this looks quite promising - I'll try to sketch a solution without giving everything away ;-) > > Ps

Re: Perl equivalent to the unix 'cut' command

2004-10-14 Thread John W. Krahn
Dave Kettmann wrote: Howdy list, Hello, Subject speaks for itself.. Need to find a function or module to work like the 'cut' command. I have a file with multiple fields and i need to 'cut' out 2 of the fields. Looked thru CPAN for cut, but didnt find anything, Really? I found it right away. http:/

Re: counting gaps in sequence data

2004-10-14 Thread Michael Robeson
Yeah, I have just submitted that same question verbatim to the bio-perl list. I am still running through some ideas though. I have both Bioinformatics perl books. They are not very effective teaching books. The books spend too much time on using modules. Though while I understand the usefulness

Re: counting gaps in sequence data

2004-10-14 Thread Paul Johnson
On Thu, Oct 14, 2004 at 04:50:30PM -0500, Errin Larsen wrote: > Hi Paul, > I think you missed a critical part of Mike's post!: No, I didn't miss it. I just thought it likely that Mike could get to there from where I left off, so I gave a solution to the bit that seemed most troublesome. >

Re: counting gaps in sequence data

2004-10-14 Thread Errin Larsen
On Thu, 14 Oct 2004 23:23:48 +0200, Paul Johnson <[EMAIL PROTECTED]> wrote: > On Thu, Oct 14, 2004 at 11:02:06AM -0600, Michael Robeson wrote: > > > I have a set of data that looks something like the following: > > > So, my problem is that I think I know some of the bits of code to put > > into p

Re: re-format database file

2004-10-14 Thread Gunnar Hjalmarsson
Brian Volk wrote: I have a database file, some_sch.txt that is arranged like this: username1 First Last Some Community Sch 1000 S Adams St Town, Indiana 12345 U.S.A. username2 First Last Some Community Sch 1000 S Adams St Town, Indiana 12345 U.S.A. username3 First Last Some Community

Re: counting gaps in sequence data

2004-10-14 Thread Michael Robeson
Here is as far as I can get with some real code and pseudo code. This is just to show you that I am actually trying. :-) Pseudo - code # open DNA sequence file print "Enter in the name of the DNA sequence file:\n"; chomp (my $dna_s

RE: Perl equivalent to the unix 'cut' command

2004-10-14 Thread Chris Devers
On Thu, 14 Oct 2004, Dave Kettmann wrote: > Each line is probably 80-100 characters in legnth, the files are about > 300Kb each (6 files total) working with 1GB of memory. Oh, that's it? I'm sure you'll be find then > Looking at these numbers, dont know that these are really that big of > a f

RE: Perl equivalent to the unix 'cut' command

2004-10-14 Thread Dave Kettmann
> On Thu, 14 Oct 2004, Dave Kettmann wrote: > > > The reply was deserved :) Just another question before I go too far > > with this... The files I am parsing (just needing 2 tabbed > fields out > > of them) are approximately 20,000 - 25,000 lines long a > piece. Each of > > these files will

RE: Perl equivalent to the unix 'cut' command

2004-10-14 Thread Chris Devers
On Thu, 14 Oct 2004, Dave Kettmann wrote: > The reply was deserved :) Just another question before I go too far > with this... The files I am parsing (just needing 2 tabbed fields out > of them) are approximately 20,000 - 25,000 lines long a piece. Each of > these files will be globbed into one

Re: counting gaps in sequence data

2004-10-14 Thread Paul Johnson
On Thu, Oct 14, 2004 at 11:02:06AM -0600, Michael Robeson wrote: > I have a set of data that looks something like the following: > So, my problem is that I think I know some of the bits of code to put > into place the problem is I am getting lost on how to structure it all > together. >

RE: Perl equivalent to the unix 'cut' command

2004-10-14 Thread Dave Kettmann
> -Original Message- > From: Chris Devers [mailto:[EMAIL PROTECTED] > Sent: Thursday, October 14, 2004 4:16 PM > To: Perl List (E-mail) > Cc: Dave Kettmann > Subject: Re: Perl equivalent to the unix 'cut' command > > > On Thu, 14 Oct 2004, Chris Devers wrote: > > > On Thu, 14 Oct 2004,

Re: Perl equivalent to the unix 'cut' command

2004-10-14 Thread Chris Devers
On Thu, 14 Oct 2004, Chris Devers wrote: > On Thu, 14 Oct 2004, Dave Kettmann wrote: > > > Subject speaks for itself.. > > Okay then. > > perldoc -f split > > Also speaks for itself :-) To be less snarky, you probably need to open up your file, iterate over it line by line, using split

Re: re-format database file

2004-10-14 Thread Bee
> I have a database file, some_sch.txt that is arranged like this: > > username1 > First Last > Some Community Sch > 1000 S Adams St > Town, Indiana 12345 U.S.A. > > username2 > First Last > Some Community Sch > 1000 S Adams St > Town, Indiana 12345 U.S.A. > > username3 > First Last > Some Communit

Re: Perl equivalent to the unix 'cut' command

2004-10-14 Thread Chris Devers
On Thu, 14 Oct 2004, Dave Kettmann wrote: > Subject speaks for itself.. Okay then. perldoc -f split Also speaks for itself :-) -- Chris Devers -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Perl equivalent to the unix 'cut' command

2004-10-14 Thread Dave Kettmann
Howdy list, Subject speaks for itself.. Need to find a function or module to work like the 'cut' command. I have a file with multiple fields and i need to 'cut' out 2 of the fields. Looked thru CPAN for cut, but didnt find anything, started looking thru CPAN searching on 'File' but I think I'm

re-format database file

2004-10-14 Thread Brian Volk
Hi All, I have a database file, some_sch.txt that is arranged like this: username1 First Last Some Community Sch 1000 S Adams St Town, Indiana 12345 U.S.A. username2 First Last Some Community Sch 1000 S Adams St Town, Indiana 12345 U.S.A. username3 First Last Some Community Sch 10

Re: perl's equivalent for jpgraph (www.aditus.nu/jpgraph/)

2004-10-14 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Chris Devers) writes: >On Thu, 14 Oct 2004, Peter Scott wrote: >> In article <[EMAIL PROTECTED]>, >> [EMAIL PROTECTED] (Wiggins d Anconia) writes: >> > >> >A quick search of CPAN turns up some options. I have personally had >> >success with GD::G

Re: counting gaps in sequence data

2004-10-14 Thread Errin Larsen
On Thu, 14 Oct 2004 16:08:44 -0400, Willy West <[EMAIL PROTECTED]> wrote: > On Thu, 14 Oct 2004 14:47:57 -0500, Errin Larsen <[EMAIL PROTECTED]> wrote: > > > > > > bio-informatics is a big area in which Perl is involved... there's even > > > a book from O'reilly on the subject... > > > If what

Re: counting gaps in sequence data

2004-10-14 Thread Willy West
On Thu, 14 Oct 2004 14:47:57 -0500, Errin Larsen <[EMAIL PROTECTED]> wrote: > > > bio-informatics is a big area in which Perl is involved... there's even > > a book from O'reilly on the subject... > If what you say is true, then maybe Mike needs to take his questions > to those list? I mean

Re: counting gaps in sequence data

2004-10-14 Thread Errin Larsen
On Thu, 14 Oct 2004 15:40:24 -0400, Willy West <[EMAIL PROTECTED]> wrote: > > PS: is this a common problem/exercise in some class somewhere? I keep > > seeing requests for help having to do with those exact strings of DNA > > data. Is there a bunch of people working on DNA projects using Perl > >

Re: counting gaps in sequence data

2004-10-14 Thread Willy West
> PS: is this a common problem/exercise in some class somewhere? I keep > seeing requests for help having to do with those exact strings of DNA > data. Is there a bunch of people working on DNA projects using Perl > somewhere? Or, is this some homework? bio-informatics is a big area in which Pe

Re: counting gaps in sequence data

2004-10-14 Thread Errin Larsen
On Thu, 14 Oct 2004 11:02:06 -0600, Michael Robeson <[EMAIL PROTECTED]> wrote: > I have a set of data that looks something like the following: > <> > > So, any suggestions would be greatly appreciated. If anyone can help me > out with all or even just bits of this I would greatly appreciate it.

Re: File parsing

2004-10-14 Thread JupiterHost.Net
What is the best way to this. (Fastest??). perldoc -f open and search on search.cpan.org for CSV Lee.M - JupiterHost.Net -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

File parsing

2004-10-14 Thread Ajey Kulkarni
Hi, I'm parsing a file line by line. The fine is a comma separated file. I would like to search & replace or simply DELETE a column(field). 00018/11/1988 Development Government/Defense USA CSCIGROUND STATION UPGRADE Military Ground Command/Control

counting gaps in sequence data

2004-10-14 Thread Michael Robeson
I have a set of data that looks something like the following: >human acgtt---cgatacg---acgact-t >chimp acgtacgatac---actgca---ac >mouse acgata---acgatcgacgt I am having trouble setting up a hash etc., to count the number and types of continuous gaps. For example the 'human' sequence above

RE: time manipulation

2004-10-14 Thread Bob Showalter
Patricio Bruna V. wrote: > i need to do some calc with dates, time betwen one date and other, are > any modules that you recommend? I think the DateTime family of modules is the direction things are heading. http://datetime.perl.org See also a neat (although a bit dated) high-level view at: htt

Re: could not find ParserDetails.ini in /usr/lib/perl5/vendor_perl/5.8.3/XML/SAX; also need some advice about XML parsing modules on CPAN

2004-10-14 Thread Ken Wolcott
Wiggins d Anconia wrote: See if I can actually get somewhere with this. XML::Simple is just a wrapper around one of the lower level XML parsers. Essentially any parser can be used. XML::DOM and XML::SAX are two examples, within these examples they can/do wrap lower level C libs, such as expat[1] o

Re: Move folder from one pc to another pc...

2004-10-14 Thread Wiggins d Anconia
> I have develop a perl script that transfer a data that we want, from one machine to another machine. > > $ftp_server= "***.***.***.***"; > $login = "roime"; > $password = "roimepuniran"; > $upload_to_dir = "/flow/flowBig"; > $input_file = "/flow/netflow"; > $new_file_name =

Re: time manipulation

2004-10-14 Thread Wiggins d Anconia
> i need to do some calc with dates, time betwen one date and other, are > any modules that you recommend? > > thx > There are several available from CPAN. Date::Calc, Date::Manip, DateTime to name just a few notables. You can also usually do calculations in seconds and use Time::Local and 'loc

Re: emacs and perl

2004-10-14 Thread Steve Bertrand
> On Wed, 13 Oct 2004 22:24:11 -0500, Jon Mosco <[EMAIL PROTECTED]> > wrote: >> I was wondering if anyone had some advice or pointers >> for perl and emacs. I want to be able to run my >> programs in a window similar to the way you can >> with 'compile' mode with c. If anyone has some >> tips or

RE: form content passing

2004-10-14 Thread Adamiec, Larry
> > > &ReadParse; > > Oi, first off don't do this > > use CGI 'param'; > > instead I have used CGI 'param' before. Don't know why I didn't use here. > > > my $ua = LWP::UserAgent->new; > > > > my $req = POST 'http://some_server/test2.asp', > > [ hidden_1 => 'XXaaXX', > >

time manipulation

2004-10-14 Thread Patricio Bruna V.
i need to do some calc with dates, time betwen one date and other, are any modules that you recommend? thx -- Patricio Bruna V. Red Hat Certified Engineer Ingeniero Soporte Linux Center S.A. Fono: 2745000 Canada 239, Providencia Santiago -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addit

Re: emacs and perl

2004-10-14 Thread Willy West
On Wed, 13 Oct 2004 22:24:11 -0500, Jon Mosco <[EMAIL PROTECTED]> wrote: > I was wondering if anyone had some advice or pointers > for perl and emacs. I want to be able to run my > programs in a window similar to the way you can > with 'compile' mode with c. If anyone has some > tips or pointers,

RE: network sockets.

2004-10-14 Thread Bob Showalter
Etienne Ledoux wrote: > greetings, > > I'm attempting a perl program that will listen on a port for a > connection. when a connection is made some info will be transfered > and the client will disconnect. > > I've never done this before but seem to be making some progress with > all the resources

network sockets.

2004-10-14 Thread Etienne Ledoux
greetings, I'm attempting a perl program that will listen on a port for a connection. when a connection is made some info will be transfered and the client will disconnect. I've never done this before but seem to be making some progress with all the resources available on the net. I was just w

Re: array assignement

2004-10-14 Thread Gunnar Hjalmarsson
Mauro wrote: Ok guy I solved my problem. The correct line was: my @pippo = qx/ssh [EMAIL PROTECTED] sar -u 1 1|awk '\/\%usr \%sys \%wio \%idle\/ { getline ; printf "\%s \%s \%s \%s\\n", \$2, \$3, \$4, \$5 }'/ ; There is a better way. See my last message in this thread. -- Gunnar Hjalmarsson Email

Re: array assignement

2004-10-14 Thread Gunnar Hjalmarsson
Mauro wrote: I wanted to say... How can I tell to perl: "take all between qx/ and / without try to understend what is written" or well "don't try to sobstitue anything between qx/ and /"? In that case, you should read the guidance about that in the description of the qx// operator in "perldoc perl

Re: array assignement

2004-10-14 Thread Mauro
Ok guy I solved my problem. The correct line was: my @pippo = qx/ssh [EMAIL PROTECTED] sar -u 1 1|awk '\/\%usr\%sys \%wio \%idle\/ { getline ; printf "\%s \%s \%s \%s\\n", \$2, \$3, \$4, \$5 }'/ ; I had problem because perl try to undertand what meant "@ and / and %..." Thank you Mauro

Re: Creation of file

2004-10-14 Thread Chris Devers
On Thu, 14 Oct 2004 [EMAIL PROTECTED] wrote: > How to create a file with write permission to all users. perldoc -f chmod -- Chris Devers -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: perl's equivalent for jpgraph (www.aditus.nu/jpgraph/)

2004-10-14 Thread Chris Devers
On Thu, 14 Oct 2004, Peter Scott wrote: > In article <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] (Wiggins d Anconia) writes: > > > >A quick search of CPAN turns up some options. I have personally had > >success with GD::Graph. Don't know that it is as powerful (read: makes > >things as pretty) as th

Re: perl's equivalent for jpgraph (www.aditus.nu/jpgraph/)

2004-10-14 Thread Chris Devers
On Wed, 13 Oct 2004, quincy wrote: > any suggestion for perl's equivalent for jpgraph (www.aditus.nu/jpgraph/) ? GD::Graph is more or less the standard graph generating module for Perl, but it isn't the only or even necessarily the best option. See here:

Re: array assignement

2004-10-14 Thread Mauro
That's ok Gunnar... I wanted to say... How can I tell to perl: "take all between qx/ and / without try to understend what is written" or well "don't try to sobstitue anything between qx/ and /"? Thank You - Original Message - From: "Gunnar Hjalmarsson" <[EMAIL PROTECTED]> To: <[EMAIL PRO

Re: RE: Regex to match valid host or dns names

2004-10-14 Thread perl
Your regex did not allow (w2k-server-proxy2) a valid dns name. I now see how complex it is to match valid ips or dns names. The more I try to modify the regex to perfection, the more I see hopholes. So I think it is not worthwhile spending lot of time on this regex. My script does more than patte

Re: perl's equivalent for jpgraph (www.aditus.nu/jpgraph/)

2004-10-14 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Wiggins d Anconia) writes: >> any suggestion for perl's equivalent for jpgraph >(www.aditus.nu/jpgraph/) ? >> > >A quick search of CPAN turns up some options. I have personally had >success with GD::Graph. Don't know that it is as powerful (read:

Re: array assignement

2004-10-14 Thread Gunnar Hjalmarsson
Mauro wrote: I want to assign to an array the output of operating system command: /usr/bin/ssh [EMAIL PROTECTED] sar -u 1 1|awk '/%usr %sys%wio %idle/ { getline ; printf "%s %s %s %s\n", $2, $3, $4, $5 }' How can I do it? Use backticks (or the qx// operator) to capture output in Perl from a s

Perl/TK Development Suite/Gui

2004-10-14 Thread Bastian Angerstein
Hi, I am looking for a free (graphic) development tool for building perl/tk applications. It should run under AIX and/or Linux. If anybody knows a good tool, with something like a tk gui-painter tell me, please. Thanks Bastian -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional command

array assignement

2004-10-14 Thread Mauro
Hi all, I want to assign to an array the output of operating system command: /usr/bin/ssh [EMAIL PROTECTED] sar -u 1 1|awk '/%usr%sys%wio %idle/ { getline ; printf "%s %s %s %s\n", $2, $3, $4, $5 }' How can I do it? I have some problem because there are a lot of special character... Than

Re: Creation of file

2004-10-14 Thread Gunnar Hjalmarsson
Arjun Mallik wrote: How to create a file with write permission to all users.It is now over ! it should be possible even the file exists and should not matter what are the existing permissions. and who ever may be the owner. Considering the latter, you need to be root, so you can't do it without

emacs and perl

2004-10-14 Thread Jon Mosco
I was wondering if anyone had some advice or pointers for perl and emacs. I want to be able to run my programs in a window similar to the way you can with 'compile' mode with c. If anyone has some tips or pointers, please let me know. Jon M. P.S. I already know about eshell and the like. -

Creation of file

2004-10-14 Thread arjun.mallik
Hi , How to create a file with write permission to all users.It is now over ! it should be possible even the file exists and should not matter what are the existing permissions. and who ever may be the owner. Finally file should be with 666 permissions. I have tried umask it was not working ,i